module LintWare
Public Class Methods
init_dir_linting(error_bin, path)
click to toggle source
# File lib/helpers/lint_ware.rb, line 31 def self.init_dir_linting(error_bin, path) if CheckJsFiles.find_dir(path) files = CheckJsFiles.seek_js(path) files.each { |file| start_all(error_bin, file) } && files else CheckJsFiles.find_dir(path) end end
init_files_linting(error_bin, path)
click to toggle source
# File lib/helpers/lint_ware.rb, line 23 def self.init_files_linting(error_bin, path) if CheckJsFiles.find_file(path) start_all(error_bin, path) else puts "No such File as #{path}".yellow end end
Private Class Methods
start_all(error_bin, given_file)
click to toggle source
# File lib/helpers/lint_ware.rb, line 11 def self.start_all(error_bin, given_file) file = JsParser.new(given_file) NamingChecker.check_naming_res(error_bin, file) SpacingChecker.check_spaces_res(error_bin, file) ClassCount.class_count_res(error_bin, file) ClassName.check_class_name_res(error_bin, file) UnusedVarChecker.check_unused_var_res(error_bin, file) error_bin end