Skip to content

Commit

Permalink
sty
Browse files Browse the repository at this point in the history
  • Loading branch information
Remi-Gau committed Sep 28, 2024
1 parent bd20f7d commit 3bdb025
Show file tree
Hide file tree
Showing 8 changed files with 110 additions and 14 deletions.
23 changes: 23 additions & 0 deletions .github/validation.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
---
name: Validation

on:
push:
branches: [main]
pull_request:

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
# Markdown formatting
remark:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 14
- name: Run markdown style checks
run: make remark
20 changes: 20 additions & 0 deletions .github/workflows/check-md-links.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
---
name: Check Markdown links

on:
push:
branches: [main]
pull_request:

jobs:
markdown-link-check:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- uses: gaurav-nelson/github-action-markdown-link-check@v1
with:
use-quiet-mode: no
use-verbose-mode: no
config-file: md_link_check_config.json
folder-path: docs
file-path: ./README.md
7 changes: 7 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# folders
*.DS_Store
tmp

# node
node_modules
package*json
26 changes: 17 additions & 9 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,16 +1,24 @@
---
# See https://pre-commit.com for more information
# See https://pre-commit.com/hooks.html for more hooks
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.6.0
hooks:
- id: trailing-whitespace
- id: end-of-file-fixer
- id: check-yaml
- id: check-json
- id: check-added-large-files
- id: check-case-conflict
- repo: https://github.com/codespell-project/codespell
- id: trailing-whitespace
- id: end-of-file-fixer
- id: check-yaml
- id: check-json
- id: check-added-large-files
- id: check-case-conflict
- id: check-merge-conflict
- id: mixed-line-ending
- repo: https://github.com/codespell-project/codespell
rev: v2.3.0
hooks:
- id: codespell
- id: codespell
- repo: https://github.com/jumanjihouse/pre-commit-hook-yamlfmt
rev: 0.2.3
hooks:
- id: yamlfmt
args: [--mapping, '4', --sequence, '4', --offset, '0']
18 changes: 18 additions & 0 deletions .remarkrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{
"plugins": [
"preset-lint-markdown-style-guide",
"preset-lint-recommended",
"remark-gfm",
["lint-no-duplicate-headings", false],
["lint-list-item-indent", "tab-size"],
["lint-emphasis-marker", "consistent"],
["lint-maximum-line-length", 500],
["lint-maximum-heading-length", false],
["lint-no-shortcut-reference-link", false],
["remark-lint-unordered-list-marker-style", "-"],
["lint-no-trailing-spaces"],
["remark-lint-code-block-style", false],
["lint-no-undefined-references", false],
["remark-lint-heading-style", false]
]
}
16 changes: 11 additions & 5 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ The current list of labels are

> Git hook scripts are useful for identifying simple issues before submission to code review.
For more information on Git hooks, see: https://pre-commit.com/.
For more information on Git hooks and pre-commit, check the pre-commit [documentation](https://pre-commit.com/).

Several of the BIDS repositories have a `.pre-commit-config.yaml` configuration
at the root of the repository.
Expand All @@ -136,14 +136,14 @@ To uninstall the pre-commit hooks, run `pre-commit uninstall`.
We appreciate all contributions to BIDS.
**THANK YOU** for helping us build these useful resources.

#### 1. Comment on an existing issue or open a new issue referencing your addition
### 1. Comment on an existing issue or open a new issue referencing your addition

This allows other members of the BIDS team to confirm
that you aren't overlapping with work that's currently underway
and that everyone is on the same page
with the goal of the work you're going to carry out.

#### 2. [Fork](https://help.github.com/articles/fork-a-repo/) [this repository](https://github.com/bids-standard/bids-specification) to your profile
### 2. [Fork](https://help.github.com/articles/fork-a-repo/) [this repository](https://github.com/bids-standard/bids-specification) to your profile

This is now your own unique copy of a repository.
Changes here won't affect anyone else's work,
Expand All @@ -152,14 +152,14 @@ so it's a safe space to explore edits to the specification!
Make sure to [keep your fork up to date](https://help.github.com/articles/syncing-a-fork/) with the upstream repository,
otherwise you can end up with lots of dreaded [merge conflicts](https://help.github.com/articles/about-merge-conflicts/).

#### 3. Make the changes you've discussed
### 3. Make the changes you've discussed

Try to keep the changes focused.
If you submit a large amount of work in all in one go,
it will be much more work for whomever is reviewing your pull request.
Please detail the changes you are attempting to make.

#### 4. Submit a [pull request](https://help.github.com/articles/about-pull-requests/)
### 4. Submit a [pull request](https://help.github.com/articles/about-pull-requests/)

Please keep the title of your pull request short
but informative in case it appears in a changelog.
Expand All @@ -168,12 +168,18 @@ Use one of the following prefixes in the title of your pull request:

- `[ENH]` - enhancement of the repository
that adds a new feature

- `[FIX]` - fix of a typo, a bug, or language clarification

- `[INFRA]` - changes to the infrastructure:
for example automating the specification release.

- `[MISC]` - everything else that cannot fit into another category

- `[REF]` - Refactoring

- `[SCHEMA]` - changes to the BIDS schema and/or related code

- `[STY]` - Stylistic change or code formatting.

If you are opening a pull request to obtain early feedback,
Expand Down
8 changes: 8 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
package.json:
npm install `cat npm-requirements.txt`

# Linting
remark: package.json
npx remark \
./CONTRIBUTING.md \
--rc-path .remarkrc
6 changes: 6 additions & 0 deletions npm-requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
[email protected]
remark-gfm@1
[email protected]
[email protected]
remark-lint-no-trailing-spaces@2
all-contributors-cli

0 comments on commit 3bdb025

Please sign in to comment.