Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
mruby
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Libraries
mruby
Commits
d0e07b5f
Unverified
Commit
d0e07b5f
authored
Jun 23, 2021
by
Yukihiro "Matz" Matsumoto
Committed by
GitHub
Jun 23, 2021
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #5492 from jbampton/add-file-contents-sorter-pre-commit
Add official pre-commit file-contents-sorter
parents
388bcb15
7d2a2e10
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
16 deletions
+2
-16
.pre-commit-config.yaml
.pre-commit-config.yaml
+2
-9
scripts/ci/pre-commit/sort-codespell-wordlist.sh
scripts/ci/pre-commit/sort-codespell-wordlist.sh
+0
-7
No files found.
.pre-commit-config.yaml
View file @
d0e07b5f
...
...
@@ -21,6 +21,8 @@ repos:
-
id
:
check-yaml
-
id
:
detect-private-key
-
id
:
end-of-file-fixer
-
id
:
file-contents-sorter
files
:
^codespell\.txt$
-
id
:
fix-byte-order-marker
-
id
:
mixed-line-ending
-
id
:
trailing-whitespace
...
...
@@ -54,12 +56,3 @@ repos:
entry
:
yamllint --strict -c .github/linters/.yaml-lint.yml
types
:
[
yaml
]
files
:
\.(yaml|yml)$
-
repo
:
local
hooks
:
-
id
:
sort-codespell-wordlist
name
:
Sort codespell.txt
description
:
Sort alphabetically and uniquify codespell.txt
entry
:
./scripts/ci/pre-commit/sort-codespell-wordlist.sh
language
:
system
files
:
^\.pre-commit-config\.yaml$|^codespell\.txt$
require_serial
:
true
scripts/ci/pre-commit/sort-codespell-wordlist.sh
deleted
100755 → 0
View file @
388bcb15
#!/usr/bin/env bash
CODESPELL_WORDLIST
=
"codespell.txt"
temp_file
=
$(
mktemp
)
sort
<
"
${
CODESPELL_WORDLIST
}
"
|
uniq
>
"
${
temp_file
}
"
cat
"
${
temp_file
}
"
>
"
${
CODESPELL_WORDLIST
}
"
rm
"
${
temp_file
}
"
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment