Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
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
1 change: 1 addition & 0 deletions .github/helper/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ bench get-app check_run "${GITHUB_WORKSPACE}" --skip-assets

printf '%s\n' 'frappe' 'erpnext' 'hrms' 'check_run' > ~/frappe-bench/sites/apps.txt
bench setup requirements --python
bench setup requirements --dev
bench use test_site

bench start &> bench_run_logs.txt &
Expand Down
29 changes: 29 additions & 0 deletions .github/workflows/code-duplication.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: Code Duplication

on:
push:
branches: ["*"]
pull_request:
branches: ["*"]

permissions:
contents: read
pull-requests: write
issues: write

jobs:
duplication:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0

- uses: actions/setup-node@v4
with:
node-version: '18'

- uses: agritheory/test_utils/actions/code_duplication@main
with:
max_clones: 60
max_percentage: 5.0
20 changes: 20 additions & 0 deletions .github/workflows/overrides.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: Track Overrides

on:
pull_request:
branches:
- version-14
- version-15

jobs:
track_overrides:
runs-on: ubuntu-latest
name: Track Overrides
steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Track Overrides
uses: agritheory/test_utils/actions/track_overrides@main
with:
app: check_run
80 changes: 38 additions & 42 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,24 @@ repos:
- id: trailing-whitespace
files: 'check_run.*'
exclude: '.*json$|.*txt$|.*csv|.*md|.*svg'
- id: check-yaml
- id: no-commit-to-branch
args: ['--branch', 'version-15']
args: ['--branch', 'version-15', '--branch', 'version-16']
- id: check-merge-conflict
- id: check-ast
- id: check-json
- id: check-toml
- id: check-yaml
- id: debug-statements

- repo: https://github.com/codespell-project/codespell
rev: v2.4.1
hooks:
- id: codespell
args: ["--ignore-words-list", "notin"]
exclude: 'yarn.lock|poetry.lock'
additional_dependencies:
- tomli

- repo: https://github.com/asottile/pyupgrade
rev: v3.19.1
hooks:
Expand All @@ -28,55 +37,42 @@ repos:
rev: 951ccf4d5bb0d692b457a5ebc4215d755618eb68
hooks:
- id: black
args: ['--line-length', '99']

- repo: local
hooks:
- id: prettier
name: prettier
entry: npx prettier -w . --config .prettierrc.js --ignore-path .prettierignore
language: system

- repo: https://github.com/PyCQA/isort
rev: 6.0.1
hooks:
- id: isort

- repo: https://github.com/PyCQA/autoflake
rev: v2.3.1
hooks:
- id: autoflake
args: [--remove-all-unused-imports, --in-place]

- repo: https://github.com/PyCQA/flake8
rev: 7.1.2
rev: 7.2.0
hooks:
- id: flake8
additional_dependencies: ['flake8-bugbear']

- repo: https://github.com/codespell-project/codespell
rev: v2.3.0
hooks:
- id: codespell
additional_dependencies:
- tomli
args: ['-L delink']

- repo: https://github.com/pre-commit/mirrors-mypy
rev: v1.15.0
- repo: https://github.com/agritheory/test_utils
rev: v1.15.4
hooks:
- id: mypy
exclude: ^tests/
args: ['--install-types', '--non-interactive', '--ignore-missing-imports']
- id: update_pre_commit_config
- id: validate_frappe_project
- id: validate_copyright
files: '\.(js|ts|py|md)$'
args: ['--app', 'check_run']
- id: bylines
exclude: 'README.md|CHANGELOG.md'
- id: clean_customized_doctypes
args: ['--app', 'check_run']
- id: validate_customizations
- id: patch_linters
args: ['--app', 'check_run']
- id: track_overrides
args: ['--directory', '.', '--app', 'check_run', '--base-branch', 'version-15']

- repo: local
- repo: https://github.com/pre-commit/mirrors-prettier
rev: v3.1.0
hooks:
- id: validate_customizations
always_run: true
name: .github/validate_customizations.py
entry: python .github/validate_customizations.py
language: system
types: [python]
- id: prettier
types_or: [javascript, vue, scss]
exclude: |
(?x)^(
.*node_modules.*|
check_run/public/dist/.*|
check_run/public/js/lib/.*
)$

ci:
autoupdate_schedule: weekly
Expand Down
3 changes: 3 additions & 0 deletions .prettierrc.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// Copyright (c) 2026, AgriTheory and contributors
// For license information, please see license.txt

module.exports = {
arrowParens: 'avoid',
bracketSameLine: true,
Expand Down
Loading
Loading