Skip to content
This repository has been archived by the owner on Sep 19, 2020. It is now read-only.

Commit

Permalink
Numeric value for mode should be 5 digits (CHEF-174)
Browse files Browse the repository at this point in the history
  • Loading branch information
aia committed Feb 21, 2012
1 parent f562b40 commit 5606616
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion features/006_check_file_mode.feature
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ Feature: Check file mode
| cookbook_file | 00644 | valid |
| directory | 755 | invalid |
| directory | "755" | valid |
| directory | 0644 | valid |
| directory | 0644 | invalid |
| directory | "0644" | valid |
| directory | 400 | invalid |
| directory | 00400 | valid |
Expand Down
2 changes: 1 addition & 1 deletion lib/foodcritic/rules.rb
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@
rule "FC006", "Mode should be quoted or fully specified when setting file permissions" do
tags %w{correctness files}
recipe do |ast|
ast.xpath(%q{//ident[@value='mode']/parent::command/descendant::int[string-length(@value) < 4]/
ast.xpath(%q{//ident[@value='mode']/parent::command/descendant::int[string-length(@value) < 5]/
ancestor::method_add_block}).map{|resource| match(resource)}
end
end
Expand Down

0 comments on commit 5606616

Please sign in to comment.