Exemplo n.º 1
0
        private static bool MustIgnore(string name)
        {
            if (_ignoreRegex.IsMatch(name))
            {
                return(true);
            }

            string ignoreFiles = WESettings.GetString(WESettings.Keys.JsHint_ignoreFiles);

            if (string.IsNullOrEmpty(ignoreFiles))
            {
                return(false);
            }

            string[] custom = ignoreFiles.Split(';');

            return(custom.Any(c => Regex.IsMatch(name, c.Trim(), RegexOptions.IgnoreCase)));
        }
Exemplo n.º 2
0
        public override void LoadSettingsFromStorage()
        {
            EnableJsHint     = WESettings.GetBoolean(WESettings.Keys.EnableJsHint);
            IgnoreFiles      = WESettings.GetString(WESettings.Keys.JsHint_ignoreFiles);
            RunJsHintOnBuild = WESettings.GetBoolean(WESettings.Keys.RunJsHintOnBuild);
            ErrorLocation    = (WESettings.Keys.FullErrorLocation)WESettings.GetInt(WESettings.Keys.JsHintErrorLocation);
            JsHint_maxerr    = WESettings.GetInt(WESettings.Keys.JsHint_maxerr);

            JsHint_bitwise   = WESettings.GetBoolean(WESettings.Keys.JsHint_bitwise);
            JsHint_camelcase = WESettings.GetBoolean(WESettings.Keys.JsHint_camelcase);
            JsHint_curly     = WESettings.GetBoolean(WESettings.Keys.JsHint_curly);
            JsHint_eqeqeq    = WESettings.GetBoolean(WESettings.Keys.JsHint_eqeqeq);
            JsHint_forin     = WESettings.GetBoolean(WESettings.Keys.JsHint_forin);
            JsHint_immed     = WESettings.GetBoolean(WESettings.Keys.JsHint_immed);
            JsHint_indent    = WESettings.GetInt(WESettings.Keys.JsHint_indent);
            JsHint_latedef   = WESettings.GetBoolean(WESettings.Keys.JsHint_latedef);
            JsHint_newcap    = WESettings.GetBoolean(WESettings.Keys.JsHint_newcap);
            JsHint_noarg     = WESettings.GetBoolean(WESettings.Keys.JsHint_noarg);
            JsHint_noempty   = WESettings.GetBoolean(WESettings.Keys.JsHint_noempty);
            JsHint_nonew     = WESettings.GetBoolean(WESettings.Keys.JsHint_nonew);
            JsHint_plusplus  = WESettings.GetBoolean(WESettings.Keys.JsHint_plusplus);
            JsHint_quotmark  = WESettings.GetBoolean(WESettings.Keys.JsHint_quotmark);
            JsHint_regexp    = WESettings.GetBoolean(WESettings.Keys.JsHint_regexp);
            JsHint_undef     = WESettings.GetBoolean(WESettings.Keys.JsHint_undef);
            JsHint_unused    = WESettings.GetBoolean(WESettings.Keys.JsHint_unused);
            JsHint_strict    = WESettings.GetBoolean(WESettings.Keys.JsHint_strict);
            JsHint_trailing  = WESettings.GetBoolean(WESettings.Keys.JsHint_trailing);

            JsHint_asi          = WESettings.GetBoolean(WESettings.Keys.JsHint_asi);
            JsHint_boss         = WESettings.GetBoolean(WESettings.Keys.JsHint_boss);
            JsHint_debug        = WESettings.GetBoolean(WESettings.Keys.JsHint_debug);
            JsHint_eqnull       = WESettings.GetBoolean(WESettings.Keys.JsHint_eqnull);
            JsHint_esnext       = WESettings.GetBoolean(WESettings.Keys.JsHint_esnext);
            JsHint_evil         = WESettings.GetBoolean(WESettings.Keys.JsHint_evil);
            JsHint_expr         = WESettings.GetBoolean(WESettings.Keys.JsHint_expr);
            JsHint_funcscope    = WESettings.GetBoolean(WESettings.Keys.JsHint_funcscope);
            JsHint_globalstrict = WESettings.GetBoolean(WESettings.Keys.JsHint_globalstrict);
            JsHint_iterator     = WESettings.GetBoolean(WESettings.Keys.JsHint_iterator);
            JsHint_lastsemic    = WESettings.GetBoolean(WESettings.Keys.JsHint_lastsemic);
            JsHint_laxbreak     = WESettings.GetBoolean(WESettings.Keys.JsHint_laxbreak);
            JsHint_laxcomma     = WESettings.GetBoolean(WESettings.Keys.JsHint_laxcomma);
            JsHint_loopfunc     = WESettings.GetBoolean(WESettings.Keys.JsHint_loopfunc);
            JsHint_multistr     = WESettings.GetBoolean(WESettings.Keys.JsHint_multistr);
            JsHint_onecase      = WESettings.GetBoolean(WESettings.Keys.JsHint_onecase);
            JsHint_proto        = WESettings.GetBoolean(WESettings.Keys.JsHint_proto);
            JsHint_regexdash    = WESettings.GetBoolean(WESettings.Keys.JsHint_regexdash);
            JsHint_scripturl    = WESettings.GetBoolean(WESettings.Keys.JsHint_scripturl);
            JsHint_smarttabs    = WESettings.GetBoolean(WESettings.Keys.JsHint_smarttabs);
            JsHint_shadow       = WESettings.GetBoolean(WESettings.Keys.JsHint_shadow);
            JsHint_sub          = WESettings.GetBoolean(WESettings.Keys.JsHint_sub);
            JsHint_supernew     = WESettings.GetBoolean(WESettings.Keys.JsHint_supernew);
            JsHint_validthis    = WESettings.GetBoolean(WESettings.Keys.JsHint_validthis);

            JsHint_browser     = WESettings.GetBoolean(WESettings.Keys.JsHint_browser);
            JsHint_couch       = WESettings.GetBoolean(WESettings.Keys.JsHint_couch);
            JsHint_devel       = WESettings.GetBoolean(WESettings.Keys.JsHint_devel);
            JsHint_dojo        = WESettings.GetBoolean(WESettings.Keys.JsHint_dojo);
            JsHint_jquery      = WESettings.GetBoolean(WESettings.Keys.JsHint_jquery);
            JsHint_mootools    = WESettings.GetBoolean(WESettings.Keys.JsHint_mootools);
            JsHint_node        = WESettings.GetBoolean(WESettings.Keys.JsHint_node);
            JsHint_nonstandard = WESettings.GetBoolean(WESettings.Keys.JsHint_nonstandard);
            JsHint_prototypejs = WESettings.GetBoolean(WESettings.Keys.JsHint_prototypejs);
            JsHint_rhino       = WESettings.GetBoolean(WESettings.Keys.JsHint_rhino);
            JsHint_worker      = WESettings.GetBoolean(WESettings.Keys.JsHint_worker);
            JsHint_wsh         = WESettings.GetBoolean(WESettings.Keys.JsHint_wsh);
        }