learn_linter 0.4.0 → 0.5.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/bin/learn-lint +9 -4
- data/lib/learn_linter/learn_error.rb +1 -1
- data/lib/learn_linter/readme_linter.rb +1 -0
- data/lib/learn_linter/version.rb +1 -1
- data/lib/learn_linter.rb +2 -2
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 50878a15317abe96eaf05ee2e8b1d3e74a4ca1d8
|
4
|
+
data.tar.gz: c2a6b0540e6512fc75b47881c9c62c9f4fd5cd1d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 83e811fdd5e1595463cb15da512fc21631c2d8accdab1207834ec8d148b3a2c067bd77c3a4e4b35118b69bfa4544d9d38d775c6fb9a4c91ce8276abf2568ccd0
|
7
|
+
data.tar.gz: a0ff8b62314c8b05abdb214d72028f58ed9f09e039680da16172d728e8c2c4f6c80027865880489503be8a28899bca339e56056bfd7b2eda2bdaee55c9787b37
|
data/bin/learn-lint
CHANGED
@@ -2,15 +2,20 @@
|
|
2
2
|
|
3
3
|
require 'yaml'
|
4
4
|
require 'optparse'
|
5
|
-
|
6
|
-
require_relative '../lib/learn_linter'
|
5
|
+
require_relative '../lib/learn_linter.rb'
|
7
6
|
|
8
|
-
if ARGV.length
|
7
|
+
if ARGV.length == 0
|
8
|
+
lint = LearnLinter.new.lint_directory
|
9
|
+
elsif ARGV.length == 1 && ARGV[0] == "quiet"
|
10
|
+
dir = File.expand_path(File.dirname(File.dirname(__FILE__)))
|
11
|
+
lint = LearnLinter.new(dir, "quiet")
|
12
|
+
elsif ARGV.length > 1 && ARGV[1] == "quiet"
|
9
13
|
lint = LearnLinter.new(ARGV[0], "quiet").lint_directory
|
10
14
|
elsif ARGV.length > 1 && ARG[1] != "quiet"
|
11
15
|
puts "please use 'learn-lint directory_name quiet' or 'learn-lint directory_name"
|
12
|
-
|
16
|
+
elsif ARGV.length == 1
|
13
17
|
lint = LearnLinter.new(ARGV[0]).lint_directory
|
14
18
|
end
|
15
19
|
|
16
20
|
|
21
|
+
|
@@ -14,7 +14,7 @@ class LearnError < StandardError
|
|
14
14
|
@readme_error = {present_readme: false, valid_readme: false}
|
15
15
|
@license_error = {present_license: false, valid_license: false}
|
16
16
|
@correct_yaml_content = {message: ".learn file must have 'tags', 'resources' and 'languages' keys", color: :yellow}
|
17
|
-
@valid_yaml = {message: "invalid yaml", color: :red}
|
17
|
+
@valid_yaml = {message: "invalid yaml or missing .learn", color: :red}
|
18
18
|
@valid_license = {message: "invalid or missing license content", color: :yellow}
|
19
19
|
@valid_readme = {message: "invalid code snippet. Must have three backticks to open and close all code snippets", color: :red}
|
20
20
|
@present_learn = {message: "missing .learn file", color: :red}
|
data/lib/learn_linter/version.rb
CHANGED
data/lib/learn_linter.rb
CHANGED