Skip to content
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/automaticRelease.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
contents: write
steps:
- name: Checkout code
uses: actions/checkout@v6
uses: actions/checkout@v7
- name: Download artifact
uses: actions/download-artifact@v8
- name: Release
Expand Down
38 changes: 38 additions & 0 deletions .markdownlint.jsonc
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
// A part of NonVisual Desktop Access (NVDA)
// Copyright (C) 2025 NV Access Limited
// This file may be used under the terms of the GNU General Public License, version 2 or later, as modified by the NVDA license.
// For full terms and any additional permissions, see the NVDA license file: https://github.com/nvaccess/nvda/blob/master/copying.txt
//
// Markdown linting rules.
{
// Use ATX style headings. E.g.
// # This is a heading
"heading-style": {
"style": "atx"
},
// Don't complain about using tabs in markdown
"hard_tab": false,
// Don't complain about lines being too long
"line-length": false,
// Only complain about repeated headings in the same part of the document outline
// Needed for the changelog
// We could consider enabling this on a file-by-file basis
"no-duplicate-heading": {
"siblings_only": true
},
// Several of our markdown files include trailing punctuation in headings
"no-trailing-punctuation": false,
// Rule is incompatible with the anchor style we use in the user guide
"link-fragments": false,
// Many of our code blocks lack a language
// This should probably be fixed gradually
"fenced-code-language": false,
"ul-style": {
"style": "asterisk"
},
"table-column-style": {
// MD060: Tables use single padding around the column delimiters.
// e.g. | Column 1 | Column 2 |
"style": "compact"
}
}
93 changes: 0 additions & 93 deletions .pre-commit-config.yaml

This file was deleted.

2 changes: 1 addition & 1 deletion .python-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
3.13.12
3.13
Comment thread
seanbudd marked this conversation as resolved.
165 changes: 165 additions & 0 deletions prek.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,165 @@
# Configuration file for `prek`, a git hook framework written in Rust.
# See https://prek.j178.dev for more information.
# Based on the .pre-commit-config.yaml file of the NVDA project, and the prek.toml file of the addon-template repositories
# https://github.com/nvaccess/nvda
# https://github.com/nvaccess/addonTemplate

#:schema https://www.schemastore.org/prek.json
default_language_version = { python = "python3.13" }

[[repos]]
repo = "meta"
hooks = [
{ id = "check-useless-excludes" },
{ id = "check-hooks-apply" }
]


# Built-in hooks reimplemented in Rust by prek. No repo clone or environment setup required.
[[repos]]
repo = "builtin"
hooks = [
# Prevents commits to certain branches
{
id = "no-commit-to-branch",
args = [
"--branch",
"main",
"--branch",
"master"
]
},
# Checks that large files have not been added. Default cut-off for "large" files is 500kb.
{ id = "check-added-large-files" },
# Checks for filenames that will conflict on case insensitive filesystems (the majority of Windows filesystems, most of the time)
{ id = "check-case-conflict" },
# Checks for artifacts from resolving merge conflicts.
{ id = "check-merge-conflict" },
# Removes trailing whitespace.
{
id = "trailing-whitespace",
types_or = [
"python",
"c",
"c++",
"batch",
"markdown",
"toml",
"yaml",
"powershell"
]
},
# Ensures all files end in 1 (and only 1) newline.
{
id = "end-of-file-fixer",
types_or = [
"python",
"c",
"c++",
"batch",
"markdown",
"toml",
"yaml",
"powershell"
]
},
# Removes the UTF-8 BOM from files that have it.
# See https://github.com/nvaccess/nvda/blob/master/projectDocs/dev/codingStandards.md#encoding
{
id = "fix-byte-order-marker",
types_or = [
"python",
"c",
"c++",
"batch",
"markdown",
"toml",
"yaml",
"powershell"
]
},
# Validates TOML files.
{ id = "check-toml" },
# Validates YAML files.
{ id = "check-yaml" },
# Ensures that links to lines in files under version control point to a particular commit.
{ id = "check-vcs-permalinks" }
]

[[repos]]
repo = "https://github.com/pre-commit/pre-commit-hooks"
rev = "v6.0.0"
hooks = [
{ id = "check-ast" },
{ id = "debug-statements" },
]
Comment thread
nvdaes marked this conversation as resolved.

[[repos]]
repo = "https://github.com/kjanat/actionlint"
rev = "v1.12.0"
hooks = [
{ id = "actionlint" }
]

[[repos]]
repo = "https://github.com/asottile/add-trailing-comma"
rev = "v4.0.0"
hooks = [
{
id = "add-trailing-comma",
groups = ["autofix"]
}
]

[[repos]]
repo = "https://github.com/astral-sh/ruff-pre-commit"
rev = "v0.16.3"
hooks = [
{
id = "ruff",
name = "lint with ruff",
groups = ["autofix"],
args = ["--fix"]
},
{
id = "ruff-format",
name = "format with ruff",
groups = ["autofix"]
}
]

[[repos]]
repo = "https://github.com/astral-sh/uv-pre-commit"
rev = "0.12.5"
hooks = [
{
id = "uv-lock",
name = "Verify uv lock file",
groups = ["autofix"],
args = ["-p3.13"]
}
]

[[repos]]
repo = "https://github.com/DavidAnson/markdownlint-cli2"
rev = "v0.23.2"
hooks = [
{
id = "markdownlint-cli2",
name = "Lint markdown files",
groups = ["autofix"],
args = ["--fix"]
}
]

[[repos]]
repo = "https://github.com/astral-sh/ty-pre-commit"
rev = "v0.0.73"
hooks = [
{
id = "ty",
name = "type check with ty",
always_run = false,
types = ["python"],
}
]
Loading