Class: BrightpearlCommand::ScriptsCodeSniffer

Inherits:
Convoy::ActionCommand::Base
  • Object
show all
Defined in:
lib/routes/scripts_code_sniffer.rb

Instance Method Summary collapse

Instance Method Details

#executeObject



5
6
7
8
9
10
11
12
# File 'lib/routes/scripts_code_sniffer.rb', line 5

def execute

    @opts = command_options
    @args = arguments
    opts_validate
    opts_routing

end

#opts_routingObject



18
19
20
21
22
# File 'lib/routes/scripts_code_sniffer.rb', line 18

def opts_routing

    run_code_sniffer

end

#opts_validateObject



14
15
16
# File 'lib/routes/scripts_code_sniffer.rb', line 14

def opts_validate

end

#run_code_snifferObject



24
25
26
27
28
29
30
31
32
# File 'lib/routes/scripts_code_sniffer.rb', line 24

def run_code_sniffer

    @todo
    command = "phpcs --report=full --standard=#{Brightpearl::Config.param(Brightpearl::Config::WORKSTATION_PATH_TO_BP_CODE)}/brightpearl/private/tests/phpcs/phpcs.xml #{Brightpearl::Config.param(Brightpearl::Config::WORKSTATION_PATH_TO_BP_CODE)}/brightpearl/private/library/Lib/#{@args[0]}"
    puts command
    exit
    system(command)

end