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
8 changes: 6 additions & 2 deletions .github/workflows/validate-repo-maintenance.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
name: Validate Repo Maintenance

# Branch protection should require the Actions check context `validate`.
# GitHub exposes the job check run by this job name, not by the workflow title.

on:
pull_request:
push:
Expand All @@ -8,10 +11,11 @@ on:

jobs:
validate:
name: validate
runs-on: macos-latest
steps:
- uses: actions/checkout@v4
- name: Install SwiftLint
run: brew install swiftlint
- name: Install Swift repo-maintenance tools
run: brew install swiftformat swiftlint
- name: Run repo-maintenance validation
run: bash scripts/repo-maintenance/validate-all.sh
49 changes: 11 additions & 38 deletions .swiftlint.yml
Original file line number Diff line number Diff line change
@@ -1,47 +1,20 @@
included:
- gmax
- gmaxTests
- gmaxUITests
# Keep SwiftLint focused on non-formatting checks.
# SwiftFormat owns visual shape in this repository.

excluded:
- gmax.xcodeproj
- docs
- scripts
- .build
- .local

reporter: xcode

disabled_rules:
- line_length
- file_length
- type_body_length
- function_body_length
- function_parameter_count
- cyclomatic_complexity
- nesting
- large_tuple
- identifier_name
- type_name
- todo
- trailing_comma
- switch_case_alignment
- implicit_optional_initialization
- multiple_closures_with_trailing_closure
- for_where

opt_in_rules:
only_rules:
- duplicate_imports
- empty_count
- empty_string
- fatal_error_message
- force_try
- force_unwrapping
- implicitly_unwrapped_optional
- unused_import

force_try:
severity: error

force_cast:
severity: error
severity: warning

force_unwrapping:
severity: error

implicitly_unwrapped_optional:
severity: error
severity: warning
2 changes: 1 addition & 1 deletion scripts/repo-maintenance/config/profile.env
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
# Managed by repo-maintenance-toolkit. Do not hand-edit unless you also control the installer contract.
# Managed by maintain-project-repo. Do not hand-edit unless you also control the installer contract.
REPO_MAINTENANCE_PROFILE="xcode-app"
REPO_MAINTENANCE_PROFILE_DESCRIPTION="Xcode app repo-maintenance profile for native Apple app repositories."
1 change: 1 addition & 0 deletions scripts/repo-maintenance/config/release.env
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
# Repo-maintenance release defaults.
REPO_MAINTENANCE_DEFAULT_RELEASE_MODE=standard
REPO_MAINTENANCE_RELEASE_BRANCH=main
2 changes: 1 addition & 1 deletion scripts/repo-maintenance/hooks/pre-commit.sample
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ if ! command -v swiftformat >/dev/null 2>&1; then
fi

if [ ! -f "$config_file" ]; then
echo "SwiftFormat pre-commit hook expected a checked-in config at $config_file, but it was missing. Restore the managed .swiftformat file or refresh the repo-maintenance toolkit before committing." >&2
echo "SwiftFormat pre-commit hook expected a checked-in config at $config_file, but it was missing. Restore the managed .swiftformat file or refresh maintain-project-repo before committing." >&2
exit 1
fi

Expand Down
2 changes: 1 addition & 1 deletion scripts/repo-maintenance/lib/common.sh
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ load_profile_env() {
}

ensure_git_repo() {
git -C "$REPO_ROOT" rev-parse --is-inside-work-tree >/dev/null 2>&1 || die "The repo-maintenance toolkit must run inside a git worktree rooted at $REPO_ROOT."
git -C "$REPO_ROOT" rev-parse --is-inside-work-tree >/dev/null 2>&1 || die "maintain-project-repo must run inside a git worktree rooted at $REPO_ROOT."
}

run_dispatch_dir() {
Expand Down
Loading
Loading