README.md (2428B)
1 # Linting 2 3 From the repository root, build the tools once: 4 5 ```sh 6 docker build -t resume-lint linting 7 ``` 8 9 Run in PowerShell: 10 11 ```powershell 12 docker run --rm --network none -v "${PWD}:/workspace:ro" resume-lint 13 ``` 14 15 Run in Linux or macOS: 16 17 ```sh 18 docker run --rm --network none -v "$PWD:/workspace:ro" resume-lint 19 ``` 20 21 Rebuild when tool dependencies change. Checks run offline, mount the source 22 read-only, and require no Docker socket. The first image build needs internet. 23 GitHub Actions runs these same commands for pushes and pull requests. 24 25 | Content | Check | 26 | --- | --- | 27 | HTML | HTMLHint: structure, attributes, duplicate IDs, alternative text | 28 | CSS | Stylelint recommended correctness rules | 29 | Python | Ruff: errors, imports, common bugs | 30 | English in HTML | CSpell spelling and write-good prose/style suggestions | 31 | Compose | Docker Compose configuration validation plus yamllint | 32 | Dockerfiles | Hadolint | 33 | Shell scripts | ShellCheck | 34 | Other YAML, including the workflow | yamllint | 35 36 All checks run even if an earlier check fails; any failure produces a nonzero 37 exit status. Each check lists its source files and prints PASS or FAIL with its 38 exit code. The final summary counts checks and unique files, and lists files 39 without a configured lint check so coverage is explicit. English checks list 40 the original HTML file whose extracted prose is checked. 41 42 Files are discovered recursively, excluding Git metadata, Python 43 virtual environments, bytecode, and node_modules. Dockerfiles use `Dockerfile` 44 or `*.Dockerfile`; Compose files use the standard compose/docker-compose names. 45 46 English checks extract visible HTML text, image alternative text, titles, 47 accessibility labels, and meta descriptions. They omit template expressions, 48 scripts, styles, and code blocks. Reported prose line numbers match the HTML 49 source. These are spelling and style checks, not a complete grammar checker. 50 Add legitimate names and technical terms to `cspell.json`; review prose 51 suggestions rather than automatically rewriting the document. 52 The subjective adverb and weasel-word checks are disabled so qualifiers such as 53 "approximately 55%" remain valid. Other write-good checks retain their defaults. 54 55 Configuration and tool dependencies live in this directory. The workflow itself 56 lives in `.github/workflows/`, as required by GitHub Actions. These tools are 57 development dependencies and are not installed in the website image.