Skip to content

Commit ef36039

Browse files
committed
Add pre-commit to run standard hooks plus codespell
1 parent 6dc4d2f commit ef36039

15 files changed

Lines changed: 197 additions & 141 deletions

File tree

.gitattributes

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
* text=auto eol=lf
2-
dist/** -diff linguist-generated=true
2+
dist/** -diff linguist-generated=true

.github/CODEOWNERS

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
* @dhavalgojiya
1+
* @dhavalgojiya

.github/workflows/ci-release.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,14 @@ on:
66
- "v[0-9]" # Major version release (e.g., v1, v2, ..., v9)
77

88
jobs:
9+
pre-commit:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- uses: actions/checkout@v6
13+
- uses: pre-commit/[email protected]
14+
- uses: pre-commit-ci/[email protected]
15+
if: always()
16+
917
solr-release-test:
1018
name: solr-release-test (Solr ${{ matrix.solr-version }})
1119
runs-on: ubuntu-latest

.github/workflows/ci-test.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ jobs:
9090
run: |
9191
echo "Pinging Solr Core: ${SOLR_CORE}"
9292
RESPONSE=$(curl -s --fail "http://127.0.0.1:8983/solr/${SOLR_CORE}/admin/ping?wt=json")
93-
93+
9494
if echo "$RESPONSE" | grep -q '"status":"OK"'; then
9595
echo "🎉 Solr is healthy and responding"
9696
else

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,4 +112,4 @@ out
112112
.yarn/unplugged
113113
.yarn/build-state.yml
114114
.yarn/install-state.gz
115-
.pnp.*
115+
.pnp.*

.pre-commit-config.yaml

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
# Learn more about this config here: https://pre-commit.com/
2+
3+
# To enable these pre-commit hooks run:
4+
# `pipx install pre-commit` or `brew install pre-commit`
5+
# Then in the project root directory run `pre-commit install`
6+
7+
repos:
8+
- repo: https://github.com/pre-commit/pre-commit-hooks
9+
rev: v6.0.0
10+
hooks:
11+
- id: check-added-large-files
12+
- id: check-case-conflict
13+
- id: check-docstring-first
14+
- id: check-executables-have-shebangs
15+
- id: check-illegal-windows-names
16+
- id: check-json
17+
- id: check-merge-conflict
18+
- id: check-shebang-scripts-are-executable
19+
- id: check-symlinks
20+
- id: check-toml
21+
- id: check-vcs-permalinks
22+
- id: check-xml
23+
- id: check-yaml
24+
- id: destroyed-symlinks
25+
- id: detect-aws-credentials
26+
args:
27+
- --allow-missing-credentials
28+
- id: detect-private-key
29+
- id: end-of-file-fixer
30+
- id: file-contents-sorter
31+
- id: forbid-new-submodules
32+
- id: forbid-submodules
33+
- id: mixed-line-ending
34+
args:
35+
- --fix=lf
36+
- id: sort-simple-yaml
37+
- id: trailing-whitespace
38+
exclude: dist/index.js
39+
40+
- repo: https://github.com/codespell-project/codespell
41+
rev: v2.4.1
42+
hooks:
43+
- id: codespell
44+
args:
45+
- --ignore-words-list=nd
46+
additional_dependencies:
47+
- tomli
48+
exclude: dist/index.js

CODE_OF_CONDUCT.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -51,17 +51,17 @@ Community Moderators take reports of violations seriously and will make every ef
5151

5252
If an investigation by the Community Moderators finds that this Code of Conduct has been violated, the following enforcement ladder may be used to determine how best to repair harm, based on the incident’s impact on the individuals involved and the community as a whole. Depending on the severity of a violation, lower rungs on the ladder may be skipped.
5353

54-
1. **Warning**
55-
Event: A violation involving a single incident or series of actions.
54+
1. **Warning**
55+
Event: A violation involving a single incident or series of actions.
5656
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.
5757

58-
2. **Temporary Ban**
59-
Event: A violation involving a series of actions or a single serious incident.
58+
2. **Temporary Ban**
59+
Event: A violation involving a series of actions or a single serious incident.
6060
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.
6161

62-
3. **Permanent Ban**
63-
Event: A pattern of repeated code of conduct violations that other steps on the ladder have failed to resolve, or a violation so serious that the Community Moderators determine there is no way to keep the community safe with this person as a member.
64-
Consequence: Access to all community spaces, tools, and communication channels is removed. In general, permanent bans should be rarely used, should have strong reasoning behind them, and should only be resorted to if working through other remedies has failed to change the behavior.
62+
3. **Permanent Ban**
63+
Event: A pattern of repeated code of conduct violations that other steps on the ladder have failed to resolve, or a violation so serious that the Community Moderators determine there is no way to keep the community safe with this person as a member.
64+
Consequence: Access to all community spaces, tools, and communication channels is removed. In general, permanent bans should be rarely used, should have strong reasoning behind them, and should only be resorted to if working through other remedies has failed to change the behavior.
6565
Repair: There is no possible repair in cases of this severity.
6666

6767
This enforcement ladder is intended as a guideline. It does not limit the ability of Community Managers to use their discretion and judgment, in keeping with the best interests of our community.

LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,4 +18,4 @@ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
1818
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
1919
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
2020
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21-
SOFTWARE.
21+
SOFTWARE.

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<img src="https://raw.githubusercontent.com/DhavalGojiya/setup-solr-action/main/assets/images/project-logo.png" width="90%" alt="Project Apache Solr Logo"/>
55
</p>
66

7-
Easily spin up an [Apache Solr](https://solr.apache.org/) instance inside your **GitHub Actions CI** pipeline.
7+
Easily spin up an [Apache Solr](https://solr.apache.org/) instance inside your **GitHub Actions CI** pipeline.
88
This action makes it simple to provision Solr during your tests or builds, without needing complex manual setup.
99

1010
It will:
@@ -223,14 +223,14 @@ This will simulate your workflow on your local machine using [act](https://githu
223223

224224
## 🤝 Contributing
225225

226-
Want to improve this project? Contributions are welcome!
226+
Want to improve this project? Contributions are welcome!
227227
Please check out the [Contributing Guide](./CONTRIBUTING.md) for details.
228228

229229
---
230230

231231
## 👨‍💻 About the Author
232232

233-
Hi, I’m **Dhaval Gojiya** — a passionate **Software Engineer** and also a **Farmer** 🌱.
233+
Hi, I’m **Dhaval Gojiya** — a passionate **Software Engineer** and also a **Farmer** 🌱.
234234
I love building open-source tools that simplify workflows, while staying curious and grounded in both tech and nature.
235235

236236
---

dist/scripts/setup-solr.sh

100644100755
File mode changed.

0 commit comments

Comments
 (0)