yamlint 0.1.0 → 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (136) hide show
  1. checksums.yaml +4 -4
  2. data/.rubocop.yml +31 -9
  3. data/.serena/.gitignore +1 -0
  4. data/.serena/memories/project_overview.md +25 -0
  5. data/.serena/memories/style_and_conventions.md +7 -0
  6. data/.serena/memories/suggested_commands.md +17 -0
  7. data/.serena/memories/task_completion.md +5 -0
  8. data/.serena/project.yml +89 -0
  9. data/CHANGELOG.md +6 -2
  10. data/Gemfile +9 -7
  11. data/LICENSE.txt +1 -1
  12. data/README.md +155 -17
  13. data/Rakefile +10 -3
  14. data/docs/Yamlint/Cli.html +403 -0
  15. data/docs/Yamlint/Config.html +1034 -0
  16. data/docs/Yamlint/Formatter.html +433 -0
  17. data/docs/Yamlint/Linter.html +423 -0
  18. data/docs/Yamlint/Models/LintContext.html +993 -0
  19. data/docs/Yamlint/Models/Problem.html +951 -0
  20. data/docs/Yamlint/Models/Token.html +713 -0
  21. data/docs/Yamlint/Models.html +117 -0
  22. data/docs/Yamlint/Output/Base.html +290 -0
  23. data/docs/Yamlint/Output/Colored.html +293 -0
  24. data/docs/Yamlint/Output/Github.html +260 -0
  25. data/docs/Yamlint/Output/Parsable.html +258 -0
  26. data/docs/Yamlint/Output/Standard.html +270 -0
  27. data/docs/Yamlint/Output.html +208 -0
  28. data/docs/Yamlint/Parser/Comment.html +795 -0
  29. data/docs/Yamlint/Parser/CommentExtractor.html +287 -0
  30. data/docs/Yamlint/Parser/LineParser.html +423 -0
  31. data/docs/Yamlint/Parser/TokenParser/Handler.html +910 -0
  32. data/docs/Yamlint/Parser/TokenParser.html +291 -0
  33. data/docs/Yamlint/Parser.html +117 -0
  34. data/docs/Yamlint/Presets.html +266 -0
  35. data/docs/Yamlint/Rules/Anchors/AnchorHandler.html +678 -0
  36. data/docs/Yamlint/Rules/Anchors.html +314 -0
  37. data/docs/Yamlint/Rules/Base.html +968 -0
  38. data/docs/Yamlint/Rules/Braces.html +335 -0
  39. data/docs/Yamlint/Rules/Brackets.html +335 -0
  40. data/docs/Yamlint/Rules/Colons.html +313 -0
  41. data/docs/Yamlint/Rules/Commas.html +313 -0
  42. data/docs/Yamlint/Rules/CommentRule.html +298 -0
  43. data/docs/Yamlint/Rules/Comments.html +317 -0
  44. data/docs/Yamlint/Rules/CommentsIndentation.html +328 -0
  45. data/docs/Yamlint/Rules/DocumentEnd.html +332 -0
  46. data/docs/Yamlint/Rules/DocumentStart.html +332 -0
  47. data/docs/Yamlint/Rules/EmptyLines.html +300 -0
  48. data/docs/Yamlint/Rules/EmptyValues.html +273 -0
  49. data/docs/Yamlint/Rules/FloatValues.html +383 -0
  50. data/docs/Yamlint/Rules/Hyphens.html +337 -0
  51. data/docs/Yamlint/Rules/Indentation.html +329 -0
  52. data/docs/Yamlint/Rules/KeyDuplicates/DuplicateKeyHandler.html +716 -0
  53. data/docs/Yamlint/Rules/KeyDuplicates.html +258 -0
  54. data/docs/Yamlint/Rules/KeyOrdering/KeyOrderHandler.html +694 -0
  55. data/docs/Yamlint/Rules/KeyOrdering.html +258 -0
  56. data/docs/Yamlint/Rules/LineLength.html +251 -0
  57. data/docs/Yamlint/Rules/LineRule.html +304 -0
  58. data/docs/Yamlint/Rules/NewLineAtEndOfFile.html +308 -0
  59. data/docs/Yamlint/Rules/NewLines.html +310 -0
  60. data/docs/Yamlint/Rules/OctalValues.html +270 -0
  61. data/docs/Yamlint/Rules/QuotedStrings.html +381 -0
  62. data/docs/Yamlint/Rules/Registry.html +492 -0
  63. data/docs/Yamlint/Rules/TokenRule.html +298 -0
  64. data/docs/Yamlint/Rules/TrailingSpaces.html +321 -0
  65. data/docs/Yamlint/Rules/Truthy.html +288 -0
  66. data/docs/Yamlint/Rules.html +190 -0
  67. data/docs/Yamlint/Runner.html +551 -0
  68. data/docs/Yamlint.html +135 -0
  69. data/docs/_index.html +643 -0
  70. data/docs/class_list.html +54 -0
  71. data/docs/css/common.css +1 -0
  72. data/docs/css/full_list.css +58 -0
  73. data/docs/css/style.css +490 -0
  74. data/docs/file.README.html +276 -0
  75. data/docs/file_list.html +59 -0
  76. data/docs/frames.html +22 -0
  77. data/docs/index.html +276 -0
  78. data/docs/js/app.js +395 -0
  79. data/docs/js/full_list.js +244 -0
  80. data/docs/js/jquery.js +4 -0
  81. data/docs/method_list.html +1582 -0
  82. data/docs/top-level-namespace.html +110 -0
  83. data/exe/yamlint +7 -0
  84. data/lib/yamlint/cli.rb +162 -0
  85. data/lib/yamlint/config.rb +113 -0
  86. data/lib/yamlint/formatter.rb +140 -0
  87. data/lib/yamlint/linter.rb +130 -0
  88. data/lib/yamlint/models/lint_context.rb +43 -0
  89. data/lib/yamlint/models/problem.rb +44 -0
  90. data/lib/yamlint/models/token.rb +22 -0
  91. data/lib/yamlint/models.rb +9 -0
  92. data/lib/yamlint/output/base.rb +15 -0
  93. data/lib/yamlint/output/colored.rb +54 -0
  94. data/lib/yamlint/output/github.rb +20 -0
  95. data/lib/yamlint/output/parsable.rb +19 -0
  96. data/lib/yamlint/output/standard.rb +25 -0
  97. data/lib/yamlint/output.rb +26 -0
  98. data/lib/yamlint/parser/comment_extractor.rb +78 -0
  99. data/lib/yamlint/parser/line_parser.rb +30 -0
  100. data/lib/yamlint/parser/token_parser.rb +92 -0
  101. data/lib/yamlint/parser.rb +10 -0
  102. data/lib/yamlint/presets/default.rb +35 -0
  103. data/lib/yamlint/presets/relaxed.rb +34 -0
  104. data/lib/yamlint/presets.rb +19 -0
  105. data/lib/yamlint/rules/anchors.rb +133 -0
  106. data/lib/yamlint/rules/base.rb +102 -0
  107. data/lib/yamlint/rules/braces.rb +105 -0
  108. data/lib/yamlint/rules/brackets.rb +105 -0
  109. data/lib/yamlint/rules/colons.rb +73 -0
  110. data/lib/yamlint/rules/commas.rb +85 -0
  111. data/lib/yamlint/rules/comments.rb +77 -0
  112. data/lib/yamlint/rules/comments_indentation.rb +66 -0
  113. data/lib/yamlint/rules/document_end.rb +45 -0
  114. data/lib/yamlint/rules/document_start.rb +45 -0
  115. data/lib/yamlint/rules/empty_lines.rb +107 -0
  116. data/lib/yamlint/rules/empty_values.rb +43 -0
  117. data/lib/yamlint/rules/float_values.rb +67 -0
  118. data/lib/yamlint/rules/hyphens.rb +42 -0
  119. data/lib/yamlint/rules/indentation.rb +39 -0
  120. data/lib/yamlint/rules/key_duplicates.rb +127 -0
  121. data/lib/yamlint/rules/key_ordering.rb +126 -0
  122. data/lib/yamlint/rules/line_length.rb +57 -0
  123. data/lib/yamlint/rules/new_line_at_end_of_file.rb +31 -0
  124. data/lib/yamlint/rules/new_lines.rb +59 -0
  125. data/lib/yamlint/rules/octal_values.rb +62 -0
  126. data/lib/yamlint/rules/quoted_strings.rb +73 -0
  127. data/lib/yamlint/rules/registry.rb +48 -0
  128. data/lib/yamlint/rules/trailing_spaces.rb +31 -0
  129. data/lib/yamlint/rules/truthy.rb +48 -0
  130. data/lib/yamlint/rules.rb +41 -0
  131. data/lib/yamlint/runner.rb +80 -0
  132. data/lib/yamlint/version.rb +1 -1
  133. data/lib/yamlint.rb +11 -3
  134. metadata +131 -11
  135. data/CODE_OF_CONDUCT.md +0 -84
  136. data/sig/yamlint.rbs +0 -4
@@ -0,0 +1,62 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Yamlint
4
+ module Rules
5
+ class OctalValues < LineRule
6
+ rule_id 'octal-values'
7
+ desc 'Forbid implicit or explicit octal values.'
8
+ defaults({
9
+ 'forbid-implicit-octal': true,
10
+ 'forbid-explicit-octal': false
11
+ })
12
+
13
+ IMPLICIT_OCTAL_PATTERN = /:\s*0[0-7]+\s*(?:#.*)?$/
14
+ EXPLICIT_OCTAL_PATTERN = /:\s*0o[0-7]+\s*(?:#.*)?$/i
15
+
16
+ IMPLICIT_VALUE_PATTERN = /:\s*(0[0-7]+)/
17
+ EXPLICIT_VALUE_PATTERN = /:\s*(0o[0-7]+)/i
18
+
19
+ def check_line(line, line_number, _context)
20
+ return if line.strip.empty?
21
+ return if line.strip.start_with?('#')
22
+
23
+ problems = []
24
+ check_implicit_octal(line, line_number, problems)
25
+ check_explicit_octal(line, line_number, problems)
26
+ problems
27
+ end
28
+
29
+ private
30
+
31
+ def check_implicit_octal(line, line_number, problems)
32
+ return unless @config[:'forbid-implicit-octal'] && line.match?(IMPLICIT_OCTAL_PATTERN)
33
+
34
+ match = line.match(IMPLICIT_VALUE_PATTERN)
35
+ return unless match
36
+
37
+ problems << problem(
38
+ line: line_number,
39
+ column: match.begin(1) + 1,
40
+ message: "forbidden implicit octal value \"#{match[1]}\"",
41
+ fixable: false
42
+ )
43
+ end
44
+
45
+ def check_explicit_octal(line, line_number, problems)
46
+ return unless @config[:'forbid-explicit-octal'] && line.match?(EXPLICIT_OCTAL_PATTERN)
47
+
48
+ match = line.match(EXPLICIT_VALUE_PATTERN)
49
+ return unless match
50
+
51
+ problems << problem(
52
+ line: line_number,
53
+ column: match.begin(1) + 1,
54
+ message: "forbidden explicit octal value \"#{match[1]}\"",
55
+ fixable: false
56
+ )
57
+ end
58
+ end
59
+
60
+ Registry.register(OctalValues)
61
+ end
62
+ end
@@ -0,0 +1,73 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Yamlint
4
+ module Rules
5
+ class QuotedStrings < LineRule
6
+ rule_id 'quoted-strings'
7
+ desc 'Check quoting style of strings.'
8
+ defaults({
9
+ 'quote-type': 'any',
10
+ required: false,
11
+ 'extra-required': [],
12
+ 'extra-allowed': [],
13
+ 'allow-quoted-quotes': false
14
+ })
15
+
16
+ def check_line(line, line_number, _context)
17
+ return if line.strip.empty?
18
+ return if line.strip.start_with?('#')
19
+ return unless @config[:required]
20
+
21
+ problems = []
22
+ quote_type = @config[:'quote-type']
23
+
24
+ if line.match?(/:.*[^"']\s*$/) && !multiline_indicator?(line)
25
+ if @config[:required] == 'only-when-needed'
26
+ # Check if quoting is needed
27
+ else
28
+ problems << problem(
29
+ line: line_number,
30
+ column: line.index(':') + 1,
31
+ message: 'string value is not quoted',
32
+ fixable: false
33
+ )
34
+ end
35
+ end
36
+
37
+ if quote_type == 'single' && line.include?('"')
38
+ if (match = line.match(/:\s*"[^"]*"/))
39
+ problems << problem(
40
+ line: line_number,
41
+ column: match.begin(0) + 1,
42
+ message: 'wrong quote type (expected single)',
43
+ fixable: true
44
+ )
45
+ end
46
+ elsif quote_type == 'double' && line.include?("'")
47
+ if (match = line.match(/:\s*'[^']*'/))
48
+ problems << problem(
49
+ line: line_number,
50
+ column: match.begin(0) + 1,
51
+ message: 'wrong quote type (expected double)',
52
+ fixable: true
53
+ )
54
+ end
55
+ end
56
+
57
+ problems
58
+ end
59
+
60
+ def fixable?
61
+ true
62
+ end
63
+
64
+ private
65
+
66
+ def multiline_indicator?(line)
67
+ line.match?(/[|>][-+]?\s*$/)
68
+ end
69
+ end
70
+
71
+ Registry.register(QuotedStrings)
72
+ end
73
+ end
@@ -0,0 +1,48 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Yamlint
4
+ module Rules
5
+ class Registry
6
+ DISABLED_VALUES = ['disable', false].freeze
7
+
8
+ class << self
9
+ def rules
10
+ @rules ||= {}
11
+ end
12
+
13
+ def register(rule_class)
14
+ rules[rule_class.id] = rule_class
15
+ end
16
+
17
+ def get(rule_id)
18
+ rules[rule_id]
19
+ end
20
+
21
+ def all
22
+ rules.values
23
+ end
24
+
25
+ def ids
26
+ rules.keys
27
+ end
28
+
29
+ def build(config)
30
+ rules_config = config[:rules] || {}
31
+ enabled_rules = []
32
+
33
+ rules.each do |rule_id, rule_class|
34
+ rule_config = rules_config[rule_id] || rules_config[rule_id.to_sym] || {}
35
+
36
+ next if DISABLED_VALUES.include?(rule_config)
37
+ next if rule_config.is_a?(Hash) && rule_config[:enable] == false
38
+
39
+ rule_options = rule_config.is_a?(Hash) ? rule_config : {}
40
+ enabled_rules << rule_class.new(rule_options)
41
+ end
42
+
43
+ enabled_rules
44
+ end
45
+ end
46
+ end
47
+ end
48
+ end
@@ -0,0 +1,31 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Yamlint
4
+ module Rules
5
+ class TrailingSpaces < LineRule
6
+ rule_id 'trailing-spaces'
7
+ desc 'Forbid trailing spaces at the end of lines.'
8
+ defaults({})
9
+
10
+ def check_line(line, line_number, _context)
11
+ return if line.chomp.empty?
12
+
13
+ trailing = line[/[ \t]+$/]
14
+ return unless trailing
15
+
16
+ problem(
17
+ line: line_number,
18
+ column: line.rstrip.length + 1,
19
+ message: 'trailing spaces',
20
+ fixable: true
21
+ )
22
+ end
23
+
24
+ def fixable?
25
+ true
26
+ end
27
+ end
28
+
29
+ Registry.register(TrailingSpaces)
30
+ end
31
+ end
@@ -0,0 +1,48 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Yamlint
4
+ module Rules
5
+ class Truthy < LineRule
6
+ rule_id 'truthy'
7
+ desc 'Forbid truthy values that are not true/false.'
8
+ defaults({
9
+ 'allowed-values': %w[true false],
10
+ 'check-keys': true
11
+ })
12
+
13
+ TRUTHY_VALUES = %w[
14
+ YES Yes yes
15
+ NO No no
16
+ TRUE True
17
+ FALSE False
18
+ ON On on
19
+ OFF Off off
20
+ ].freeze
21
+
22
+ def check_line(line, line_number, _context)
23
+ return if line.strip.empty?
24
+ return if line.strip.start_with?('#')
25
+
26
+ problems = []
27
+ allowed = @config[:'allowed-values']
28
+
29
+ TRUTHY_VALUES.each do |truthy|
30
+ next if allowed.include?(truthy)
31
+
32
+ next unless line.match?(/:\s*#{Regexp.escape(truthy)}\s*(?:#.*)?$/)
33
+
34
+ problems << problem(
35
+ line: line_number,
36
+ column: line.index(truthy) + 1,
37
+ message: "truthy value should be one of [#{allowed.join(', ')}]",
38
+ fixable: false
39
+ )
40
+ end
41
+
42
+ problems
43
+ end
44
+ end
45
+
46
+ Registry.register(Truthy)
47
+ end
48
+ end
@@ -0,0 +1,41 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Yamlint
4
+ module Rules
5
+ autoload :Base, 'yamlint/rules/base'
6
+ autoload :LineRule, 'yamlint/rules/base'
7
+ autoload :TokenRule, 'yamlint/rules/base'
8
+ autoload :CommentRule, 'yamlint/rules/base'
9
+ autoload :Registry, 'yamlint/rules/registry'
10
+
11
+ autoload :TrailingSpaces, 'yamlint/rules/trailing_spaces'
12
+ autoload :NewLineAtEndOfFile, 'yamlint/rules/new_line_at_end_of_file'
13
+ autoload :NewLines, 'yamlint/rules/new_lines'
14
+ autoload :LineLength, 'yamlint/rules/line_length'
15
+ autoload :EmptyLines, 'yamlint/rules/empty_lines'
16
+ autoload :Indentation, 'yamlint/rules/indentation'
17
+ autoload :Colons, 'yamlint/rules/colons'
18
+ autoload :Commas, 'yamlint/rules/commas'
19
+ autoload :Braces, 'yamlint/rules/braces'
20
+ autoload :Brackets, 'yamlint/rules/brackets'
21
+ autoload :Hyphens, 'yamlint/rules/hyphens'
22
+ autoload :Comments, 'yamlint/rules/comments'
23
+ autoload :CommentsIndentation, 'yamlint/rules/comments_indentation'
24
+ autoload :DocumentStart, 'yamlint/rules/document_start'
25
+ autoload :DocumentEnd, 'yamlint/rules/document_end'
26
+ autoload :EmptyValues, 'yamlint/rules/empty_values'
27
+ autoload :KeyDuplicates, 'yamlint/rules/key_duplicates'
28
+ autoload :KeyOrdering, 'yamlint/rules/key_ordering'
29
+ autoload :Truthy, 'yamlint/rules/truthy'
30
+ autoload :QuotedStrings, 'yamlint/rules/quoted_strings'
31
+ autoload :OctalValues, 'yamlint/rules/octal_values'
32
+ autoload :FloatValues, 'yamlint/rules/float_values'
33
+ autoload :Anchors, 'yamlint/rules/anchors'
34
+
35
+ def self.load_all
36
+ constants(false).each do |const_name|
37
+ const_get(const_name)
38
+ end
39
+ end
40
+ end
41
+ end
@@ -0,0 +1,80 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Yamlint
4
+ class Runner
5
+ attr_reader :config, :output_format
6
+
7
+ def initialize(config: nil, output_format: 'colored')
8
+ @config = config || Config.load_default
9
+ @output_format = output_format
10
+ @linter = Linter.new(@config)
11
+ @formatter = Formatter.new(@config)
12
+ @output = Output.get(output_format)
13
+ end
14
+
15
+ def lint(paths)
16
+ files = collect_files(paths)
17
+ total_problems = 0
18
+ results = []
19
+
20
+ files.each do |filepath|
21
+ problems = @linter.lint_file(filepath)
22
+ total_problems += problems.length
23
+
24
+ output = @output.format(filepath, problems)
25
+ results << output unless output.empty?
26
+ end
27
+
28
+ summary = @output.format_summary(files.length, total_problems)
29
+
30
+ {
31
+ files: files.length,
32
+ problems: total_problems,
33
+ output: results.join("\n\n"),
34
+ summary:,
35
+ exit_code: total_problems.positive? ? 1 : 0
36
+ }
37
+ end
38
+
39
+ def format(paths, dry_run: false)
40
+ files = collect_files(paths)
41
+ changed_files = []
42
+
43
+ files.each do |filepath|
44
+ original = File.read(filepath)
45
+ formatted = @formatter.format(original, dry_run:)
46
+
47
+ if original != formatted
48
+ changed_files << filepath
49
+ File.write(filepath, formatted) unless dry_run
50
+ end
51
+ end
52
+
53
+ {
54
+ files: files.length,
55
+ changed: changed_files.length,
56
+ changed_files:,
57
+ exit_code: 0
58
+ }
59
+ end
60
+
61
+ private
62
+
63
+ def collect_files(paths)
64
+ files = []
65
+ yaml_patterns = @config.yaml_files
66
+
67
+ paths.each do |path|
68
+ if File.directory?(path)
69
+ yaml_patterns.each do |pattern|
70
+ files.concat(Dir.glob(File.join(path, '**', pattern)))
71
+ end
72
+ elsif File.file?(path)
73
+ files << path
74
+ end
75
+ end
76
+
77
+ files.uniq.sort
78
+ end
79
+ end
80
+ end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Yamlint
4
- VERSION = "0.1.0"
4
+ VERSION = '1.0.0'
5
5
  end
data/lib/yamlint.rb CHANGED
@@ -1,8 +1,16 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require_relative "yamlint/version"
3
+ require_relative 'yamlint/version'
4
4
 
5
5
  module Yamlint
6
- class Error < StandardError; end
7
- # Your code goes here...
6
+ autoload :Models, 'yamlint/models'
7
+ autoload :Parser, 'yamlint/parser'
8
+ autoload :Rules, 'yamlint/rules'
9
+ autoload :Presets, 'yamlint/presets'
10
+ autoload :Config, 'yamlint/config'
11
+ autoload :Linter, 'yamlint/linter'
12
+ autoload :Formatter, 'yamlint/formatter'
13
+ autoload :Runner, 'yamlint/runner'
14
+ autoload :Output, 'yamlint/output'
15
+ autoload :Cli, 'yamlint/cli'
8
16
  end
metadata CHANGED
@@ -1,33 +1,154 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: yamlint
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 1.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Yudai Takada
8
- autorequire:
9
8
  bindir: exe
10
9
  cert_chain: []
11
- date: 2022-11-16 00:00:00.000000000 Z
10
+ date: 1980-01-02 00:00:00.000000000 Z
12
11
  dependencies: []
13
- description:
14
12
  email:
15
13
  - t.yudai92@gmail.com
16
- executables: []
14
+ executables:
15
+ - yamlint
17
16
  extensions: []
18
17
  extra_rdoc_files: []
19
18
  files:
20
19
  - ".rspec"
21
20
  - ".rubocop.yml"
21
+ - ".serena/.gitignore"
22
+ - ".serena/memories/project_overview.md"
23
+ - ".serena/memories/style_and_conventions.md"
24
+ - ".serena/memories/suggested_commands.md"
25
+ - ".serena/memories/task_completion.md"
26
+ - ".serena/project.yml"
22
27
  - CHANGELOG.md
23
- - CODE_OF_CONDUCT.md
24
28
  - Gemfile
25
29
  - LICENSE.txt
26
30
  - README.md
27
31
  - Rakefile
32
+ - docs/Yamlint.html
33
+ - docs/Yamlint/Cli.html
34
+ - docs/Yamlint/Config.html
35
+ - docs/Yamlint/Formatter.html
36
+ - docs/Yamlint/Linter.html
37
+ - docs/Yamlint/Models.html
38
+ - docs/Yamlint/Models/LintContext.html
39
+ - docs/Yamlint/Models/Problem.html
40
+ - docs/Yamlint/Models/Token.html
41
+ - docs/Yamlint/Output.html
42
+ - docs/Yamlint/Output/Base.html
43
+ - docs/Yamlint/Output/Colored.html
44
+ - docs/Yamlint/Output/Github.html
45
+ - docs/Yamlint/Output/Parsable.html
46
+ - docs/Yamlint/Output/Standard.html
47
+ - docs/Yamlint/Parser.html
48
+ - docs/Yamlint/Parser/Comment.html
49
+ - docs/Yamlint/Parser/CommentExtractor.html
50
+ - docs/Yamlint/Parser/LineParser.html
51
+ - docs/Yamlint/Parser/TokenParser.html
52
+ - docs/Yamlint/Parser/TokenParser/Handler.html
53
+ - docs/Yamlint/Presets.html
54
+ - docs/Yamlint/Rules.html
55
+ - docs/Yamlint/Rules/Anchors.html
56
+ - docs/Yamlint/Rules/Anchors/AnchorHandler.html
57
+ - docs/Yamlint/Rules/Base.html
58
+ - docs/Yamlint/Rules/Braces.html
59
+ - docs/Yamlint/Rules/Brackets.html
60
+ - docs/Yamlint/Rules/Colons.html
61
+ - docs/Yamlint/Rules/Commas.html
62
+ - docs/Yamlint/Rules/CommentRule.html
63
+ - docs/Yamlint/Rules/Comments.html
64
+ - docs/Yamlint/Rules/CommentsIndentation.html
65
+ - docs/Yamlint/Rules/DocumentEnd.html
66
+ - docs/Yamlint/Rules/DocumentStart.html
67
+ - docs/Yamlint/Rules/EmptyLines.html
68
+ - docs/Yamlint/Rules/EmptyValues.html
69
+ - docs/Yamlint/Rules/FloatValues.html
70
+ - docs/Yamlint/Rules/Hyphens.html
71
+ - docs/Yamlint/Rules/Indentation.html
72
+ - docs/Yamlint/Rules/KeyDuplicates.html
73
+ - docs/Yamlint/Rules/KeyDuplicates/DuplicateKeyHandler.html
74
+ - docs/Yamlint/Rules/KeyOrdering.html
75
+ - docs/Yamlint/Rules/KeyOrdering/KeyOrderHandler.html
76
+ - docs/Yamlint/Rules/LineLength.html
77
+ - docs/Yamlint/Rules/LineRule.html
78
+ - docs/Yamlint/Rules/NewLineAtEndOfFile.html
79
+ - docs/Yamlint/Rules/NewLines.html
80
+ - docs/Yamlint/Rules/OctalValues.html
81
+ - docs/Yamlint/Rules/QuotedStrings.html
82
+ - docs/Yamlint/Rules/Registry.html
83
+ - docs/Yamlint/Rules/TokenRule.html
84
+ - docs/Yamlint/Rules/TrailingSpaces.html
85
+ - docs/Yamlint/Rules/Truthy.html
86
+ - docs/Yamlint/Runner.html
87
+ - docs/_index.html
88
+ - docs/class_list.html
89
+ - docs/css/common.css
90
+ - docs/css/full_list.css
91
+ - docs/css/style.css
92
+ - docs/file.README.html
93
+ - docs/file_list.html
94
+ - docs/frames.html
95
+ - docs/index.html
96
+ - docs/js/app.js
97
+ - docs/js/full_list.js
98
+ - docs/js/jquery.js
99
+ - docs/method_list.html
100
+ - docs/top-level-namespace.html
101
+ - exe/yamlint
28
102
  - lib/yamlint.rb
103
+ - lib/yamlint/cli.rb
104
+ - lib/yamlint/config.rb
105
+ - lib/yamlint/formatter.rb
106
+ - lib/yamlint/linter.rb
107
+ - lib/yamlint/models.rb
108
+ - lib/yamlint/models/lint_context.rb
109
+ - lib/yamlint/models/problem.rb
110
+ - lib/yamlint/models/token.rb
111
+ - lib/yamlint/output.rb
112
+ - lib/yamlint/output/base.rb
113
+ - lib/yamlint/output/colored.rb
114
+ - lib/yamlint/output/github.rb
115
+ - lib/yamlint/output/parsable.rb
116
+ - lib/yamlint/output/standard.rb
117
+ - lib/yamlint/parser.rb
118
+ - lib/yamlint/parser/comment_extractor.rb
119
+ - lib/yamlint/parser/line_parser.rb
120
+ - lib/yamlint/parser/token_parser.rb
121
+ - lib/yamlint/presets.rb
122
+ - lib/yamlint/presets/default.rb
123
+ - lib/yamlint/presets/relaxed.rb
124
+ - lib/yamlint/rules.rb
125
+ - lib/yamlint/rules/anchors.rb
126
+ - lib/yamlint/rules/base.rb
127
+ - lib/yamlint/rules/braces.rb
128
+ - lib/yamlint/rules/brackets.rb
129
+ - lib/yamlint/rules/colons.rb
130
+ - lib/yamlint/rules/commas.rb
131
+ - lib/yamlint/rules/comments.rb
132
+ - lib/yamlint/rules/comments_indentation.rb
133
+ - lib/yamlint/rules/document_end.rb
134
+ - lib/yamlint/rules/document_start.rb
135
+ - lib/yamlint/rules/empty_lines.rb
136
+ - lib/yamlint/rules/empty_values.rb
137
+ - lib/yamlint/rules/float_values.rb
138
+ - lib/yamlint/rules/hyphens.rb
139
+ - lib/yamlint/rules/indentation.rb
140
+ - lib/yamlint/rules/key_duplicates.rb
141
+ - lib/yamlint/rules/key_ordering.rb
142
+ - lib/yamlint/rules/line_length.rb
143
+ - lib/yamlint/rules/new_line_at_end_of_file.rb
144
+ - lib/yamlint/rules/new_lines.rb
145
+ - lib/yamlint/rules/octal_values.rb
146
+ - lib/yamlint/rules/quoted_strings.rb
147
+ - lib/yamlint/rules/registry.rb
148
+ - lib/yamlint/rules/trailing_spaces.rb
149
+ - lib/yamlint/rules/truthy.rb
150
+ - lib/yamlint/runner.rb
29
151
  - lib/yamlint/version.rb
30
- - sig/yamlint.rbs
31
152
  homepage: https://github.com/ydah/yamlint
32
153
  licenses:
33
154
  - MIT
@@ -35,7 +156,7 @@ metadata:
35
156
  homepage_uri: https://github.com/ydah/yamlint
36
157
  source_code_uri: https://github.com/ydah/yamlint
37
158
  changelog_uri: https://github.com/ydah/yamlint/releases
38
- post_install_message:
159
+ rubygems_mfa_required: 'true'
39
160
  rdoc_options: []
40
161
  require_paths:
41
162
  - lib
@@ -43,15 +164,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
43
164
  requirements:
44
165
  - - ">="
45
166
  - !ruby/object:Gem::Version
46
- version: 2.6.0
167
+ version: 3.1.0
47
168
  required_rubygems_version: !ruby/object:Gem::Requirement
48
169
  requirements:
49
170
  - - ">="
50
171
  - !ruby/object:Gem::Version
51
172
  version: '0'
52
173
  requirements: []
53
- rubygems_version: 3.3.25
54
- signing_key:
174
+ rubygems_version: 4.0.4
55
175
  specification_version: 4
56
176
  summary: A YAML file linter and formatter.
57
177
  test_files: []
data/CODE_OF_CONDUCT.md DELETED
@@ -1,84 +0,0 @@
1
- # Contributor Covenant Code of Conduct
2
-
3
- ## Our Pledge
4
-
5
- We as members, contributors, and leaders pledge to make participation in our community a harassment-free experience for everyone, regardless of age, body size, visible or invisible disability, ethnicity, sex characteristics, gender identity and expression, level of experience, education, socio-economic status, nationality, personal appearance, race, religion, or sexual identity and orientation.
6
-
7
- We pledge to act and interact in ways that contribute to an open, welcoming, diverse, inclusive, and healthy community.
8
-
9
- ## Our Standards
10
-
11
- Examples of behavior that contributes to a positive environment for our community include:
12
-
13
- * Demonstrating empathy and kindness toward other people
14
- * Being respectful of differing opinions, viewpoints, and experiences
15
- * Giving and gracefully accepting constructive feedback
16
- * Accepting responsibility and apologizing to those affected by our mistakes, and learning from the experience
17
- * Focusing on what is best not just for us as individuals, but for the overall community
18
-
19
- Examples of unacceptable behavior include:
20
-
21
- * The use of sexualized language or imagery, and sexual attention or
22
- advances of any kind
23
- * Trolling, insulting or derogatory comments, and personal or political attacks
24
- * Public or private harassment
25
- * Publishing others' private information, such as a physical or email
26
- address, without their explicit permission
27
- * Other conduct which could reasonably be considered inappropriate in a
28
- professional setting
29
-
30
- ## Enforcement Responsibilities
31
-
32
- Community leaders are responsible for clarifying and enforcing our standards of acceptable behavior and will take appropriate and fair corrective action in response to any behavior that they deem inappropriate, threatening, offensive, or harmful.
33
-
34
- Community leaders have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, and will communicate reasons for moderation decisions when appropriate.
35
-
36
- ## Scope
37
-
38
- This Code of Conduct applies within all community spaces, and also applies when an individual is officially representing the community in public spaces. Examples of representing our community include using an official e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event.
39
-
40
- ## Enforcement
41
-
42
- Instances of abusive, harassing, or otherwise unacceptable behavior may be reported to the community leaders responsible for enforcement at 13041216+ydah@users.noreply.github.com. All complaints will be reviewed and investigated promptly and fairly.
43
-
44
- All community leaders are obligated to respect the privacy and security of the reporter of any incident.
45
-
46
- ## Enforcement Guidelines
47
-
48
- Community leaders will follow these Community Impact Guidelines in determining the consequences for any action they deem in violation of this Code of Conduct:
49
-
50
- ### 1. Correction
51
-
52
- **Community Impact**: Use of inappropriate language or other behavior deemed unprofessional or unwelcome in the community.
53
-
54
- **Consequence**: A private, written warning from community leaders, providing clarity around the nature of the violation and an explanation of why the behavior was inappropriate. A public apology may be requested.
55
-
56
- ### 2. Warning
57
-
58
- **Community Impact**: A violation through a single incident or series of actions.
59
-
60
- **Consequence**: A warning with consequences for continued behavior. No interaction with the people involved, including unsolicited interaction with those enforcing the Code of Conduct, for a specified period of time. This includes avoiding interactions in community spaces as well as external channels like social media. Violating these terms may lead to a temporary or permanent ban.
61
-
62
- ### 3. Temporary Ban
63
-
64
- **Community Impact**: A serious violation of community standards, including sustained inappropriate behavior.
65
-
66
- **Consequence**: A temporary ban from any sort of interaction or public communication with the community for a specified period of time. No public or private interaction with the people involved, including unsolicited interaction with those enforcing the Code of Conduct, is allowed during this period. Violating these terms may lead to a permanent ban.
67
-
68
- ### 4. Permanent Ban
69
-
70
- **Community Impact**: Demonstrating a pattern of violation of community standards, including sustained inappropriate behavior, harassment of an individual, or aggression toward or disparagement of classes of individuals.
71
-
72
- **Consequence**: A permanent ban from any sort of public interaction within the community.
73
-
74
- ## Attribution
75
-
76
- This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 2.0,
77
- available at https://www.contributor-covenant.org/version/2/0/code_of_conduct.html.
78
-
79
- Community Impact Guidelines were inspired by [Mozilla's code of conduct enforcement ladder](https://github.com/mozilla/diversity).
80
-
81
- [homepage]: https://www.contributor-covenant.org
82
-
83
- For answers to common questions about this code of conduct, see the FAQ at
84
- https://www.contributor-covenant.org/faq. Translations are available at https://www.contributor-covenant.org/translations.