Class: BrightpearlCommand::ScriptsCodeSniffer
- Inherits:
-
Convoy::ActionCommand::Base
- Object
- Convoy::ActionCommand::Base
- BrightpearlCommand::ScriptsCodeSniffer
- Defined in:
- lib/routes/scripts_code_sniffer.rb
Instance Method Summary collapse
Instance Method Details
#execute ⇒ Object
5 6 7 8 9 10 11 12 |
# File 'lib/routes/scripts_code_sniffer.rb', line 5 def execute @opts = @args = arguments opts_validate opts_routing end |
#opts_routing ⇒ Object
18 19 20 21 22 |
# File 'lib/routes/scripts_code_sniffer.rb', line 18 def opts_routing run_code_sniffer end |
#opts_validate ⇒ Object
14 15 16 |
# File 'lib/routes/scripts_code_sniffer.rb', line 14 def opts_validate end |
#run_code_sniffer ⇒ Object
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 |