lifen-ruby-style 1.0.1 → 1.0.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.overcommit.yml +0 -1
- data/README.md +12 -1
- data/default_overcommit.yml +0 -1
- data/default_rubocop.yml +8 -0
- data/lib/lifen/ruby_style/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8611124008c5537cb23d55f58dc2f6119cb43a5eb1bd073b0e938100a094e439
|
4
|
+
data.tar.gz: 997ac45632aaac79deed3031a7470b20d0146a9ff335bdcf2098b18165a89b9d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5e3a5f1659b0afd9f7f2a3c74215af21c6873d350a3cbd4508086a6e02039f1df9d22e0dffcc1f7d7ebebff27e5529392e291bbe7868dd9ecb27e753910a56ff
|
7
|
+
data.tar.gz: 2fe07fb3c0d99834984f4856fe9c7e1da37608cdea90325d464a1a78e0248078fb1a74250688709f18a6fd05d35953170fee25ef74627a9a5f74499921c982e0
|
data/.overcommit.yml
CHANGED
data/README.md
CHANGED
@@ -250,6 +250,17 @@ https://github.com/dense-analysis/ale
|
|
250
250
|
### Workflow
|
251
251
|
|
252
252
|
- Je code ma feature en local. Mon environnement (projet + IDE) étant configuré, je suis alerté en direct des règles de style que j'enfreins. Certaines sont mêmes corrigées automatiquement, lors de la sauvegarde du fichier.
|
253
|
+
- Pour ignorer manuellement RuboCop sur des lignes données :
|
254
|
+
|
255
|
+
```ruby
|
256
|
+
"I want to ignore the Style/StringLiterals rule on this line only" # rubocop:disable Style/StringLiterals
|
257
|
+
|
258
|
+
# rubocop:disable Style/StringLiterals
|
259
|
+
"I want to ignore the Style/StringLiterals rule on this line."
|
260
|
+
"and also on this one, because I like double quotes."
|
261
|
+
# rubocop:enable Style/StringLiterals
|
262
|
+
```
|
263
|
+
|
253
264
|
- Je commit :
|
254
265
|
- Un hook de pre-commit lance une analyse RuboCop sur les fichiers "staged". Si l'analye renvoie des erreurs, le commit est bloqué.
|
255
266
|
- Un hook vérifie le message de commit
|
@@ -286,7 +297,7 @@ $ bundle exec rubocop --help
|
|
286
297
|
|
287
298
|
```bash
|
288
299
|
$ OVERCOMMIT_DISABLE=1 git [command] # Executes the git command without running the hooks
|
289
|
-
$ bundle exec overcommit --run
|
300
|
+
$ bundle exec overcommit --run # Run pre-commit hook against all git tracked files
|
290
301
|
```
|
291
302
|
|
292
303
|
Liste des commandes disponibles :
|
data/default_overcommit.yml
CHANGED
data/default_rubocop.yml
CHANGED
@@ -93,6 +93,10 @@ Style/ClassAndModuleChildren:
|
|
93
93
|
Style/Documentation:
|
94
94
|
Enabled: false
|
95
95
|
|
96
|
+
Style/IfUnlessModifier:
|
97
|
+
Enabled: true
|
98
|
+
AutoCorrect: false
|
99
|
+
|
96
100
|
Style/NumericLiterals:
|
97
101
|
Strict: true
|
98
102
|
|
@@ -108,6 +112,10 @@ Style/SymbolArray:
|
|
108
112
|
Style/WordArray:
|
109
113
|
EnforcedStyle: brackets
|
110
114
|
|
115
|
+
Rails/DynamicFindBy:
|
116
|
+
Enabled: true
|
117
|
+
AutoCorrect: false
|
118
|
+
|
111
119
|
RSpec/AnyInstance:
|
112
120
|
Enabled: false
|
113
121
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: lifen-ruby-style
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Team Lifen
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-03-
|
11
|
+
date: 2020-03-09 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: overcommit
|