overcommit 0.72.0 → 0.73.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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 05ab1b76d85aa96c6aac3359e74970e7dc186f2ca6ad72ef63c9cef40a0565da
4
- data.tar.gz: 863bcdc512b59ddd25c6a03bf6b1f04a6337b00d74607476d0fa6cc1e09090f0
3
+ metadata.gz: 887ad3a2999ba4744c926ad05bc61e453901822b378645d1dfbc10d4be0a0648
4
+ data.tar.gz: 66d06d2f6216a1e480c3e5ec053ea4fb967b6e8a80a7302d70a0cdd1a05207ef
5
5
  SHA512:
6
- metadata.gz: 2f5f4eb08a01da2c757bf7c2b1d1add5416aa9b8d7f79e3ac897986d1711b8ee2d0669d1b73cd644eb4d484b468c88cb7e21a0f3973d0535c347b3a1df4728f0
7
- data.tar.gz: 7f17b6ae21fd95a05c31715c3d9d055f4ee6059f6a027ad144e1f4e128d6179fdc40c35666821287081be839c32be35109804065aa1e1074059690a38a029113
6
+ metadata.gz: 189138eaa9cf531fa861c87014ec420e9580c1d11f1492243050c542c32a8762e1f5d58ac82bdf18fc7526d257f0bb428192d9f8b6901c2b38a8717f0fd30a8a
7
+ data.tar.gz: 917260eb13fc2f85e828fbebdbd1f04c30c6acbaeb7e02b594452d35d8974dede978d8e882c41e35348e529e09d94e0ab54aa046087c9bbf80d62437eaf7e798
data/config/default.yml CHANGED
@@ -413,6 +413,12 @@ PreCommit:
413
413
  - '**/Makefile'
414
414
  - '**/*.go'
415
415
 
416
+ HerbLint:
417
+ enabled: false
418
+ description: 'Analyze with herb-lint'
419
+ required_executable: 'herb-lint'
420
+ include: '**/*.html.erb'
421
+
416
422
  Hlint:
417
423
  enabled: false
418
424
  description: 'Analyze with hlint'
@@ -569,8 +575,42 @@ PreCommit:
569
575
  enabled: false
570
576
  description: 'Analyze with oxfmt'
571
577
  required_executable: 'oxfmt'
572
- flags: ['--check']
578
+ flags: ['--check', '--no-error-on-unmatched-pattern']
573
579
  install_command: 'npm install -g oxfmt'
580
+ include:
581
+ - '**/*.js'
582
+ - '**/*.jsx'
583
+ - '**/*.mjs'
584
+ - '**/*.cjs'
585
+ - '**/*.ts'
586
+ - '**/*.tsx'
587
+ - '**/*.mts'
588
+ - '**/*.cts'
589
+ - '**/*.json'
590
+ - '**/*.jsonc'
591
+ - '**/*.json5'
592
+ - '**/*.css'
593
+ - '**/*.scss'
594
+ - '**/*.less'
595
+ - '**/*.pcss'
596
+ - '**/*.postcss'
597
+ - '**/*.graphql'
598
+ - '**/*.gql'
599
+ - '**/*.graphqls'
600
+ - '**/*.toml'
601
+ - '**/*.yml'
602
+ - '**/*.yaml'
603
+ - '**/*.html'
604
+ - '**/*.htm'
605
+ - '**/*.xhtml'
606
+ - '**/*.vue'
607
+ - '**/*.svelte'
608
+ - '**/*.md'
609
+ - '**/*.markdown'
610
+ - '**/*.mdx'
611
+ - '**/*.hbs'
612
+ - '**/*.handlebars'
613
+ - '**/*.mjml'
574
614
 
575
615
  OxLint:
576
616
  enabled: false
@@ -578,6 +618,18 @@ PreCommit:
578
618
  required_executable: 'oxlint'
579
619
  flags: ['--format=unix']
580
620
  install_command: 'npm install -g oxlint'
621
+ include:
622
+ - '**/*.js'
623
+ - '**/*.jsx'
624
+ - '**/*.mjs'
625
+ - '**/*.cjs'
626
+ - '**/*.ts'
627
+ - '**/*.tsx'
628
+ - '**/*.mts'
629
+ - '**/*.cts'
630
+ - '**/*.vue'
631
+ - '**/*.svelte'
632
+ - '**/*.astro'
581
633
 
582
634
  Pep257: # Deprecated – use Pydocstyle instead.
583
635
  enabled: false
@@ -0,0 +1,27 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Overcommit::Hook::PreCommit
4
+ # Runs `herb-lint` against any modified ERB files.
5
+ #
6
+ # @see https://herb-tools.dev/projects/linter
7
+ class HerbLint < Base
8
+ def run
9
+ result = execute(command + ['--json'], args: applicable_files)
10
+ return :pass if result.success?
11
+
12
+ json_output = JSON.parse(result.stdout)
13
+ json_output['offenses'].map do |offense|
14
+ severity = offense['severity'] == 'error' ? :error : :warning
15
+ filename = offense['filename']
16
+ line = offense['location']['start']['line']
17
+ message = offense['message']
18
+ code = offense['code']
19
+
20
+ Overcommit::Hook::Message.new(
21
+ severity, filename, line,
22
+ "#{filename}:#{line} #{code} #{message}"
23
+ )
24
+ end
25
+ end
26
+ end
27
+ end
@@ -2,5 +2,5 @@
2
2
 
3
3
  # Defines the gem version.
4
4
  module Overcommit
5
- VERSION = '0.72.0'
5
+ VERSION = '0.73.0'
6
6
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: overcommit
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.72.0
4
+ version: 0.73.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Shane da Silva
@@ -161,6 +161,7 @@ files:
161
161
  - lib/overcommit/hook/pre_commit/hadolint.rb
162
162
  - lib/overcommit/hook/pre_commit/haml_lint.rb
163
163
  - lib/overcommit/hook/pre_commit/hard_tabs.rb
164
+ - lib/overcommit/hook/pre_commit/herb_lint.rb
164
165
  - lib/overcommit/hook/pre_commit/hlint.rb
165
166
  - lib/overcommit/hook/pre_commit/html_hint.rb
166
167
  - lib/overcommit/hook/pre_commit/html_tidy.rb
@@ -325,7 +326,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
325
326
  - !ruby/object:Gem::Version
326
327
  version: '0'
327
328
  requirements: []
328
- rubygems_version: 3.6.9
329
+ rubygems_version: 4.0.10
329
330
  specification_version: 4
330
331
  summary: Git hook manager
331
332
  test_files: []