scss-lint 0.33.0 → 0.34.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (81) hide show
  1. checksums.yaml +4 -4
  2. data/config/default.yml +19 -1
  3. data/data/properties.txt +4 -0
  4. data/lib/scss_lint.rb +1 -0
  5. data/lib/scss_lint/cli.rb +4 -42
  6. data/lib/scss_lint/config.rb +1 -45
  7. data/lib/scss_lint/control_comment_processor.rb +47 -15
  8. data/lib/scss_lint/file_finder.rb +57 -0
  9. data/lib/scss_lint/linter/bang_format.rb +1 -1
  10. data/lib/scss_lint/linter/border_zero.rb +25 -9
  11. data/lib/scss_lint/linter/color_keyword.rb +3 -13
  12. data/lib/scss_lint/linter/color_variable.rb +36 -0
  13. data/lib/scss_lint/linter/declaration_order.rb +2 -2
  14. data/lib/scss_lint/linter/important_rule.rb +12 -0
  15. data/lib/scss_lint/linter/indentation.rb +7 -1
  16. data/lib/scss_lint/linter/property_count.rb +44 -0
  17. data/lib/scss_lint/linter/property_sort_order.rb +73 -19
  18. data/lib/scss_lint/linter/string_quotes.rb +9 -0
  19. data/lib/scss_lint/linter/variable_for_property.rb +20 -0
  20. data/lib/scss_lint/linter/vendor_prefixes.rb +3 -3
  21. data/lib/scss_lint/runner.rb +5 -7
  22. data/lib/scss_lint/utils.rb +34 -0
  23. data/lib/scss_lint/version.rb +1 -1
  24. data/spec/scss_lint/cli_spec.rb +1 -1
  25. data/spec/scss_lint/config_spec.rb +4 -203
  26. data/spec/scss_lint/engine_spec.rb +4 -4
  27. data/spec/scss_lint/file_finder_spec.rb +110 -0
  28. data/spec/scss_lint/linter/bang_format_spec.rb +28 -18
  29. data/spec/scss_lint/linter/border_zero_spec.rb +50 -16
  30. data/spec/scss_lint/linter/color_keyword_spec.rb +16 -16
  31. data/spec/scss_lint/linter/color_variable_spec.rb +102 -0
  32. data/spec/scss_lint/linter/comment_spec.rb +9 -9
  33. data/spec/scss_lint/linter/compass/property_with_mixin_spec.rb +10 -10
  34. data/spec/scss_lint/linter/debug_statement_spec.rb +4 -4
  35. data/spec/scss_lint/linter/declaration_order_spec.rb +80 -80
  36. data/spec/scss_lint/linter/duplicate_property_spec.rb +30 -30
  37. data/spec/scss_lint/linter/else_placement_spec.rb +16 -16
  38. data/spec/scss_lint/linter/empty_line_between_blocks_spec.rb +38 -38
  39. data/spec/scss_lint/linter/empty_rule_spec.rb +4 -4
  40. data/spec/scss_lint/linter/final_newline_spec.rb +6 -6
  41. data/spec/scss_lint/linter/hex_length_spec.rb +16 -16
  42. data/spec/scss_lint/linter/hex_notation_spec.rb +16 -16
  43. data/spec/scss_lint/linter/hex_validation_spec.rb +6 -6
  44. data/spec/scss_lint/linter/id_selector_spec.rb +10 -10
  45. data/spec/scss_lint/linter/import_path_spec.rb +45 -45
  46. data/spec/scss_lint/linter/important_rule_spec.rb +43 -0
  47. data/spec/scss_lint/linter/indentation_spec.rb +103 -43
  48. data/spec/scss_lint/linter/leading_zero_spec.rb +45 -45
  49. data/spec/scss_lint/linter/mergeable_selector_spec.rb +32 -32
  50. data/spec/scss_lint/linter/name_format_spec.rb +75 -41
  51. data/spec/scss_lint/linter/nesting_depth_spec.rb +14 -14
  52. data/spec/scss_lint/linter/placeholder_in_extend_spec.rb +12 -12
  53. data/spec/scss_lint/linter/property_count_spec.rb +104 -0
  54. data/spec/scss_lint/linter/property_sort_order_spec.rb +138 -48
  55. data/spec/scss_lint/linter/property_spelling_spec.rb +14 -14
  56. data/spec/scss_lint/linter/qualifying_element_spec.rb +26 -26
  57. data/spec/scss_lint/linter/selector_depth_spec.rb +26 -26
  58. data/spec/scss_lint/linter/selector_format_spec.rb +114 -114
  59. data/spec/scss_lint/linter/shorthand_spec.rb +32 -32
  60. data/spec/scss_lint/linter/single_line_per_property_spec.rb +10 -10
  61. data/spec/scss_lint/linter/single_line_per_selector_spec.rb +24 -24
  62. data/spec/scss_lint/linter/space_after_comma_spec.rb +60 -60
  63. data/spec/scss_lint/linter/space_after_property_colon_spec.rb +44 -44
  64. data/spec/scss_lint/linter/space_after_property_name_spec.rb +6 -6
  65. data/spec/scss_lint/linter/space_before_brace_spec.rb +119 -119
  66. data/spec/scss_lint/linter/space_between_parens_spec.rb +48 -48
  67. data/spec/scss_lint/linter/string_quotes_spec.rb +74 -62
  68. data/spec/scss_lint/linter/trailing_semicolon_spec.rb +53 -54
  69. data/spec/scss_lint/linter/trailing_zero_spec.rb +34 -34
  70. data/spec/scss_lint/linter/unnecessary_mantissa_spec.rb +10 -10
  71. data/spec/scss_lint/linter/unnecessary_parent_reference_spec.rb +18 -18
  72. data/spec/scss_lint/linter/url_format_spec.rb +4 -4
  73. data/spec/scss_lint/linter/url_quotes_spec.rb +14 -14
  74. data/spec/scss_lint/linter/variable_for_property_spec.rb +115 -0
  75. data/spec/scss_lint/linter/vendor_prefixes_spec.rb +66 -56
  76. data/spec/scss_lint/linter/zero_unit_spec.rb +22 -22
  77. data/spec/scss_lint/linter_spec.rb +72 -28
  78. data/spec/scss_lint/runner_spec.rb +0 -1
  79. data/spec/scss_lint/selector_visitor_spec.rb +23 -23
  80. data/spec/spec_helper.rb +2 -2
  81. metadata +27 -12
@@ -17,8 +17,8 @@ RSpec.configure do |config|
17
17
  # for each example. This significantly DRYs up our linter specs to contain
18
18
  # only tests, since all the setup code is now centralized here.
19
19
  if described_class <= SCSSLint::Linter
20
- initial_indent = css[/\A(\s*)/, 1]
21
- normalized_css = css.gsub(/^#{initial_indent}/, '')
20
+ initial_indent = scss[/\A(\s*)/, 1]
21
+ normalized_css = scss.gsub(/^#{initial_indent}/, '')
22
22
 
23
23
  # Use the configuration settings defined by default unless a specific
24
24
  # configuration has been provided for the test.
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: scss-lint
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.33.0
4
+ version: 0.34.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Causes Engineering
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2015-01-21 00:00:00.000000000 Z
12
+ date: 2015-02-23 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rainbow
@@ -91,11 +91,13 @@ files:
91
91
  - lib/scss_lint/control_comment_processor.rb
92
92
  - lib/scss_lint/engine.rb
93
93
  - lib/scss_lint/exceptions.rb
94
+ - lib/scss_lint/file_finder.rb
94
95
  - lib/scss_lint/lint.rb
95
96
  - lib/scss_lint/linter.rb
96
97
  - lib/scss_lint/linter/bang_format.rb
97
98
  - lib/scss_lint/linter/border_zero.rb
98
99
  - lib/scss_lint/linter/color_keyword.rb
100
+ - lib/scss_lint/linter/color_variable.rb
99
101
  - lib/scss_lint/linter/comment.rb
100
102
  - lib/scss_lint/linter/compass.rb
101
103
  - lib/scss_lint/linter/compass/property_with_mixin.rb
@@ -111,12 +113,14 @@ files:
111
113
  - lib/scss_lint/linter/hex_validation.rb
112
114
  - lib/scss_lint/linter/id_selector.rb
113
115
  - lib/scss_lint/linter/import_path.rb
116
+ - lib/scss_lint/linter/important_rule.rb
114
117
  - lib/scss_lint/linter/indentation.rb
115
118
  - lib/scss_lint/linter/leading_zero.rb
116
119
  - lib/scss_lint/linter/mergeable_selector.rb
117
120
  - lib/scss_lint/linter/name_format.rb
118
121
  - lib/scss_lint/linter/nesting_depth.rb
119
122
  - lib/scss_lint/linter/placeholder_in_extend.rb
123
+ - lib/scss_lint/linter/property_count.rb
120
124
  - lib/scss_lint/linter/property_sort_order.rb
121
125
  - lib/scss_lint/linter/property_spelling.rb
122
126
  - lib/scss_lint/linter/qualifying_element.rb
@@ -137,6 +141,7 @@ files:
137
141
  - lib/scss_lint/linter/unnecessary_parent_reference.rb
138
142
  - lib/scss_lint/linter/url_format.rb
139
143
  - lib/scss_lint/linter/url_quotes.rb
144
+ - lib/scss_lint/linter/variable_for_property.rb
140
145
  - lib/scss_lint/linter/vendor_prefixes.rb
141
146
  - lib/scss_lint/linter/zero_unit.rb
142
147
  - lib/scss_lint/linter_registry.rb
@@ -158,9 +163,11 @@ files:
158
163
  - spec/scss_lint/cli_spec.rb
159
164
  - spec/scss_lint/config_spec.rb
160
165
  - spec/scss_lint/engine_spec.rb
166
+ - spec/scss_lint/file_finder_spec.rb
161
167
  - spec/scss_lint/linter/bang_format_spec.rb
162
168
  - spec/scss_lint/linter/border_zero_spec.rb
163
169
  - spec/scss_lint/linter/color_keyword_spec.rb
170
+ - spec/scss_lint/linter/color_variable_spec.rb
164
171
  - spec/scss_lint/linter/comment_spec.rb
165
172
  - spec/scss_lint/linter/compass/property_with_mixin_spec.rb
166
173
  - spec/scss_lint/linter/debug_statement_spec.rb
@@ -175,12 +182,14 @@ files:
175
182
  - spec/scss_lint/linter/hex_validation_spec.rb
176
183
  - spec/scss_lint/linter/id_selector_spec.rb
177
184
  - spec/scss_lint/linter/import_path_spec.rb
185
+ - spec/scss_lint/linter/important_rule_spec.rb
178
186
  - spec/scss_lint/linter/indentation_spec.rb
179
187
  - spec/scss_lint/linter/leading_zero_spec.rb
180
188
  - spec/scss_lint/linter/mergeable_selector_spec.rb
181
189
  - spec/scss_lint/linter/name_format_spec.rb
182
190
  - spec/scss_lint/linter/nesting_depth_spec.rb
183
191
  - spec/scss_lint/linter/placeholder_in_extend_spec.rb
192
+ - spec/scss_lint/linter/property_count_spec.rb
184
193
  - spec/scss_lint/linter/property_sort_order_spec.rb
185
194
  - spec/scss_lint/linter/property_spelling_spec.rb
186
195
  - spec/scss_lint/linter/qualifying_element_spec.rb
@@ -201,6 +210,7 @@ files:
201
210
  - spec/scss_lint/linter/unnecessary_parent_reference_spec.rb
202
211
  - spec/scss_lint/linter/url_format_spec.rb
203
212
  - spec/scss_lint/linter/url_quotes_spec.rb
213
+ - spec/scss_lint/linter/variable_for_property_spec.rb
204
214
  - spec/scss_lint/linter/vendor_prefixes_spec.rb
205
215
  - spec/scss_lint/linter/zero_unit_spec.rb
206
216
  - spec/scss_lint/linter_registry_spec.rb
@@ -247,14 +257,18 @@ test_files:
247
257
  - spec/scss_lint/cli_spec.rb
248
258
  - spec/scss_lint/config_spec.rb
249
259
  - spec/scss_lint/engine_spec.rb
260
+ - spec/scss_lint/file_finder_spec.rb
261
+ - spec/scss_lint/linter/bang_format_spec.rb
250
262
  - spec/scss_lint/linter/border_zero_spec.rb
251
263
  - spec/scss_lint/linter/color_keyword_spec.rb
264
+ - spec/scss_lint/linter/color_variable_spec.rb
252
265
  - spec/scss_lint/linter/comment_spec.rb
253
266
  - spec/scss_lint/linter/compass/property_with_mixin_spec.rb
254
267
  - spec/scss_lint/linter/debug_statement_spec.rb
255
268
  - spec/scss_lint/linter/declaration_order_spec.rb
256
269
  - spec/scss_lint/linter/duplicate_property_spec.rb
257
270
  - spec/scss_lint/linter/else_placement_spec.rb
271
+ - spec/scss_lint/linter/empty_line_between_blocks_spec.rb
258
272
  - spec/scss_lint/linter/empty_rule_spec.rb
259
273
  - spec/scss_lint/linter/final_newline_spec.rb
260
274
  - spec/scss_lint/linter/hex_length_spec.rb
@@ -262,20 +276,26 @@ test_files:
262
276
  - spec/scss_lint/linter/hex_validation_spec.rb
263
277
  - spec/scss_lint/linter/id_selector_spec.rb
264
278
  - spec/scss_lint/linter/import_path_spec.rb
279
+ - spec/scss_lint/linter/important_rule_spec.rb
265
280
  - spec/scss_lint/linter/indentation_spec.rb
266
281
  - spec/scss_lint/linter/leading_zero_spec.rb
267
282
  - spec/scss_lint/linter/mergeable_selector_spec.rb
283
+ - spec/scss_lint/linter/name_format_spec.rb
268
284
  - spec/scss_lint/linter/nesting_depth_spec.rb
269
285
  - spec/scss_lint/linter/placeholder_in_extend_spec.rb
286
+ - spec/scss_lint/linter/property_count_spec.rb
270
287
  - spec/scss_lint/linter/property_sort_order_spec.rb
271
288
  - spec/scss_lint/linter/property_spelling_spec.rb
272
289
  - spec/scss_lint/linter/qualifying_element_spec.rb
273
290
  - spec/scss_lint/linter/selector_depth_spec.rb
291
+ - spec/scss_lint/linter/selector_format_spec.rb
274
292
  - spec/scss_lint/linter/shorthand_spec.rb
275
293
  - spec/scss_lint/linter/single_line_per_property_spec.rb
276
294
  - spec/scss_lint/linter/single_line_per_selector_spec.rb
295
+ - spec/scss_lint/linter/space_after_comma_spec.rb
277
296
  - spec/scss_lint/linter/space_after_property_colon_spec.rb
278
297
  - spec/scss_lint/linter/space_after_property_name_spec.rb
298
+ - spec/scss_lint/linter/space_before_brace_spec.rb
279
299
  - spec/scss_lint/linter/space_between_parens_spec.rb
280
300
  - spec/scss_lint/linter/string_quotes_spec.rb
281
301
  - spec/scss_lint/linter/trailing_semicolon_spec.rb
@@ -284,16 +304,14 @@ test_files:
284
304
  - spec/scss_lint/linter/unnecessary_parent_reference_spec.rb
285
305
  - spec/scss_lint/linter/url_format_spec.rb
286
306
  - spec/scss_lint/linter/url_quotes_spec.rb
307
+ - spec/scss_lint/linter/variable_for_property_spec.rb
287
308
  - spec/scss_lint/linter/vendor_prefixes_spec.rb
288
309
  - spec/scss_lint/linter/zero_unit_spec.rb
289
- - spec/scss_lint/linter/name_format_spec.rb
290
- - spec/scss_lint/linter/empty_line_between_blocks_spec.rb
291
- - spec/scss_lint/linter/bang_format_spec.rb
292
- - spec/scss_lint/linter/space_before_brace_spec.rb
293
- - spec/scss_lint/linter/selector_format_spec.rb
294
- - spec/scss_lint/linter/space_after_comma_spec.rb
295
310
  - spec/scss_lint/linter_registry_spec.rb
311
+ - spec/scss_lint/linter_spec.rb
296
312
  - spec/scss_lint/location_spec.rb
313
+ - spec/scss_lint/options_spec.rb
314
+ - spec/scss_lint/rake_task_spec.rb
297
315
  - spec/scss_lint/reporter/config_reporter_spec.rb
298
316
  - spec/scss_lint/reporter/default_reporter_spec.rb
299
317
  - spec/scss_lint/reporter/files_reporter_spec.rb
@@ -301,11 +319,8 @@ test_files:
301
319
  - spec/scss_lint/reporter/xml_reporter_spec.rb
302
320
  - spec/scss_lint/reporter_spec.rb
303
321
  - spec/scss_lint/runner_spec.rb
304
- - spec/scss_lint/linter_spec.rb
305
- - spec/scss_lint/options_spec.rb
306
- - spec/scss_lint/rake_task_spec.rb
307
322
  - spec/scss_lint/selector_visitor_spec.rb
323
+ - spec/spec_helper.rb
308
324
  - spec/support/isolated_environment.rb
309
325
  - spec/support/matchers/report_lint.rb
310
- - spec/spec_helper.rb
311
326
  has_rdoc: