uod-foodcritic-rules 0.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/lib/foodcritic/rules/rules.rb +28 -0
- metadata +74 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 957f38e46af7707756a9ed10e9a7c08cb840c42b
|
4
|
+
data.tar.gz: 175c256213cd76ec42f6819baf415458d1cd096d
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 52bf1f50ee60107cab0047e4d4f4df93f77a5ce2f10302ec86f1e843321241d01bef4d9fc4111a28f511463e2d38749a3b727750dadabb3f8ccff3a0c2b4d95c
|
7
|
+
data.tar.gz: d3a4c52db4cef1b82c3d5a4441e829b0699d21c58e7a5ece84ef7c92e38d0fc404760c89a4b0852f1b24a7e06a2fe76e9b53accb2c7da9a115726fdfbc8220a7
|
@@ -0,0 +1,28 @@
|
|
1
|
+
#
|
2
|
+
# Author::
|
3
|
+
# Foodcritic:: Rules
|
4
|
+
#
|
5
|
+
#
|
6
|
+
#
|
7
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
8
|
+
# you may not use this file except in compliance with the License.
|
9
|
+
# You may obtain a copy of the License at
|
10
|
+
#
|
11
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
12
|
+
#
|
13
|
+
# Unless required by applicable law or agreed to in writing, software
|
14
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
15
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
16
|
+
# See the License for the specific language governing permissions and
|
17
|
+
# limitations under the License.
|
18
|
+
|
19
|
+
rule 'UOD001', 'Use version constraints on dependencies' do
|
20
|
+
tags %w{correctness uod}
|
21
|
+
metadata do |ast|
|
22
|
+
ast.xpath('//command[descendant::ident[@value = "depends"]]').map do |dep|
|
23
|
+
unless dep.xpath('args_add_block/descendant::tstring_content').count > 1
|
24
|
+
dep
|
25
|
+
end
|
26
|
+
end.compact
|
27
|
+
end
|
28
|
+
end
|
metadata
ADDED
@@ -0,0 +1,74 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: uod-foodcritic-rules
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.0.1
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Dan Webb
|
8
|
+
- Luke Bradbury
|
9
|
+
autorequire:
|
10
|
+
bindir: bin
|
11
|
+
cert_chain: []
|
12
|
+
date: 2015-04-29 00:00:00.000000000 Z
|
13
|
+
dependencies:
|
14
|
+
- !ruby/object:Gem::Dependency
|
15
|
+
name: foodcritic
|
16
|
+
requirement: !ruby/object:Gem::Requirement
|
17
|
+
requirements:
|
18
|
+
- - ">="
|
19
|
+
- !ruby/object:Gem::Version
|
20
|
+
version: 2.2.0
|
21
|
+
type: :runtime
|
22
|
+
prerelease: false
|
23
|
+
version_requirements: !ruby/object:Gem::Requirement
|
24
|
+
requirements:
|
25
|
+
- - ">="
|
26
|
+
- !ruby/object:Gem::Version
|
27
|
+
version: 2.2.0
|
28
|
+
- !ruby/object:Gem::Dependency
|
29
|
+
name: rake
|
30
|
+
requirement: !ruby/object:Gem::Requirement
|
31
|
+
requirements:
|
32
|
+
- - ">="
|
33
|
+
- !ruby/object:Gem::Version
|
34
|
+
version: '0'
|
35
|
+
type: :development
|
36
|
+
prerelease: false
|
37
|
+
version_requirements: !ruby/object:Gem::Requirement
|
38
|
+
requirements:
|
39
|
+
- - ">="
|
40
|
+
- !ruby/object:Gem::Version
|
41
|
+
version: '0'
|
42
|
+
description: UoD foodcritic rules
|
43
|
+
email:
|
44
|
+
- ai@derby.ac.uk
|
45
|
+
executables: []
|
46
|
+
extensions: []
|
47
|
+
extra_rdoc_files: []
|
48
|
+
files:
|
49
|
+
- lib/foodcritic/rules/rules.rb
|
50
|
+
homepage: https://github.com/universityofderby/foodcritic-rules
|
51
|
+
licenses:
|
52
|
+
- APACHE2
|
53
|
+
metadata: {}
|
54
|
+
post_install_message:
|
55
|
+
rdoc_options: []
|
56
|
+
require_paths:
|
57
|
+
- lib
|
58
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
59
|
+
requirements:
|
60
|
+
- - ">="
|
61
|
+
- !ruby/object:Gem::Version
|
62
|
+
version: '0'
|
63
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
64
|
+
requirements:
|
65
|
+
- - ">="
|
66
|
+
- !ruby/object:Gem::Version
|
67
|
+
version: '0'
|
68
|
+
requirements: []
|
69
|
+
rubyforge_project:
|
70
|
+
rubygems_version: 2.4.4
|
71
|
+
signing_key:
|
72
|
+
specification_version: 4
|
73
|
+
summary: Foodcritic rules for the University of Derby
|
74
|
+
test_files: []
|