Skip to content

Commit

Permalink
Rakefile: reformat help task to work with rake 12.3.3
Browse files Browse the repository at this point in the history
With rake 12.3.3, rake command fails as below

rake aborted!
SyntaxError: /root/lkp-tests/Rakefile:12: syntax error, unexpected ==, expecting keyword_end
  == SPEC ==
    ^
/root/lkp-tests/Rakefile:15: syntax error, unexpected ':', expecting keyword_end
/root/lkp-tests/Rakefile:17: syntax error, unexpected tSTRING_BEG, expecting keyword_do or '{' or '('
    rake spec spec=job"             # check spec/job_spec.rb status
                       ^
/root/lkp-tests/Rakefile:23: syntax error, unexpected tIDENTIFIER, expecting keyword_end
    rake rubocop file="lib/**/*.rb" # check all lib files
                          ^
/root/lkp-tests/Rakefile:35: syntax error, unexpected ',', expecting '}'
  t.pattern = "spec/**{,/*/**}/#{spec}_spec.rb"
                        ^
target of repeat operator is not specified: /*/
/root/lkp-tests/Rakefile:35: syntax error, unexpected '}'
  t.pattern = "spec/**{,/*/**}/#{spec}_spec.rb"
                              ^
/root/lkp-tests/Rakefile:89: syntax error, unexpected end-of-input, expecting keyword_end

Signed-off-by: Philip Li <[email protected]>
  • Loading branch information
rli9 committed Jan 13, 2024
1 parent e78c146 commit ea19661
Showing 1 changed file with 10 additions and 8 deletions.
18 changes: 10 additions & 8 deletions Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -8,20 +8,22 @@ require 'English'
desc 'Show help'
task :help do
puts <<~EOF
## SPEC
== SPEC ==
usage
rake spec [spec=result_path]
usage: rake spec [spec=result_path]
example:
example
rake spec # check all unit tests status
rake spec spec=job" # check spec/job_spec.rb status
rake spec spec=job # check spec/job_spec.rb status
== RUBOCOP ==
## RUBOCOP
usage: rake rubocop [file=pattern]
example:
rake rubocop file="lib/**/*.rb" # check all lib files
usage
rake rubocop [file=pattern]
example
rake rubocop file="lib/**/*.rb" # check all lib files
EOF
end

Expand Down

0 comments on commit ea19661

Please sign in to comment.