Exemple #1
0
        public static List <LintIssue> CheckNode(Hinge h, State node)
        {
            List <LintIssue> issues = new List <LintIssue>();

            CheckNullOps(h, h.GetTransitions().Concat(h.GetTriggers()), issues);

            if (node is Transition && !(node as Transition).IsTrigger)
            {
                CheckSymlinks(new Transition[] { node as Transition }, issues);
            }

            if (node is Transition)
            {
                CheckImagesOps(new Transition[] { node as Transition }, issues);
            }

            if (node is Transition)
            {
                CheckVars(h, new Transition[] { node as Transition }, issues, h.InteropNames);
            }

            if (node is Transition)
            {
                CheckStates(h.GetStates(), new Transition[] { node as Transition }, issues);
            }

            return(issues);
        }
Exemple #2
0
        public static List <LintIssue> Check(Hinge h)
        {
            // warn: symlink never been used
            // warn: symlink reassigned
            // warn: var assigned but never been used
            // warn: invoke transition arguments misscount
            // warn: invoke transition argument missing

            // warn: substate not found

            // err: state not found
            // err: local var used before assignment
            List <LintIssue> issues = new List <LintIssue>();

            CheckNullOps(h, h.GetTransitions().Concat(h.GetTriggers()), issues);
            CheckSymlinks(h.GetTransitions(), issues);
            CheckImagesOps(h.GetTransitions().Concat(h.GetTriggers()), issues);
            CheckVars(h, h.GetTransitions().Concat(h.GetTriggers()), issues, h.InteropNames);
            CheckStates(h.GetStates(), h.GetTransitions().Concat(h.GetTriggers()), issues);

            return(issues);
        }