Skip to content

Conversation

@icook
Copy link
Owner

@icook icook commented Dec 20, 2025

Summary

  • Add typos spell checker with _typos.toml config (excludes generated files, lock files)
  • Add taplo TOML formatter with taplo.toml config for consistent Cargo.toml formatting
  • Add hadolint Dockerfile linter with .hadolint.yaml config
  • Add actionlint GitHub Actions linter with .github/actionlint.yaml config
  • Add shellcheck shell script linter with .shellcheckrc config
  • Add new CI job static-analysis running all tools in parallel
  • Add just lint-static recipe plus individual tool recipes

New Commands

just lint-static      # Run all static analysis
just lint-typos       # Spell check
just lint-toml        # Check TOML formatting
just fmt-toml         # Fix TOML formatting
just lint-dockerfiles # Lint Dockerfiles
just lint-workflows   # Lint GitHub Actions
just lint-scripts     # Lint shell scripts

Test plan

  • just lint-static passes locally
  • just lint-backend still passes
  • CI static-analysis job passes

Closes #243

🤖 Generated with Claude Code

@github-actions
Copy link
Contributor

github-actions bot commented Dec 20, 2025

📊 CI Reports

Report Link
📊 Coverage https://icook.github.io/tiny-congress/pr/246/coverage/
📚 Storybook https://icook.github.io/tiny-congress/pr/246/storybook/
🎭 Playwright https://icook.github.io/tiny-congress/pr/246/playwright/
📋 API Schemas GraphQL · OpenAPI

🤖 Reports auto-generated from commit 63f7643

github-actions bot added a commit that referenced this pull request Dec 20, 2025
@icook icook force-pushed the enhance/243-static-analysis branch from e21a414 to d193644 Compare December 20, 2025 17:52
github-actions bot added a commit that referenced this pull request Dec 20, 2025
@icook icook force-pushed the enhance/243-static-analysis branch from d193644 to 7387e80 Compare December 20, 2025 17:57
github-actions bot added a commit that referenced this pull request Dec 20, 2025
…nt, shellcheck)

Add lightweight static analysis pipeline to catch common issues:

- typos: spell checker for code, comments, and docs
- taplo: TOML formatter/linter for consistent Cargo.toml formatting
- hadolint: Dockerfile best practices linter
- actionlint: GitHub Actions workflow linter
- shellcheck: shell script static analysis

Includes:
- Configuration files for each tool with sensible defaults
- New `just lint-static` recipe and individual tool recipes
- CI job running all checks in parallel with existing lints
- TOML formatting fixes applied by taplo

Closes #243

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <[email protected]>
@icook icook force-pushed the enhance/243-static-analysis branch from 7387e80 to e0e6446 Compare December 20, 2025 18:13
github-actions bot added a commit that referenced this pull request Dec 20, 2025
- name: Install taplo
uses: taiki-e/install-action@taplo

- name: Run static analysis
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we can toss this, seems like bloat.

.hadolint.yaml Outdated
ignored:
# Allow unpinned apt packages - we use base image version pinning instead
- DL3008
# Allow additional packages without --no-install-recommends for dev containers
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

seems like this might be worth enforcing to slim down images


# Check for typos in code and docs (requires typos: cargo install typos-cli)
lint-typos:
typos
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

seems like these won't be setup by just setup

# Taplo TOML formatter configuration
# https://taplo.tamasfe.dev/configuration/

[formatting]
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

explain the false flags

Remove actionlint ignore patterns for SC2086 and SC2129, and fix the
actual issues throughout the CI workflow:

- Quote shell variables in curl URLs and skaffold commands
- Quote variables in numfmt commands for bundle size analysis
- Use grouped redirects for GITHUB_OUTPUT and GITHUB_STEP_SUMMARY
- Quote exit status variable in Playwright test cleanup

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <[email protected]>
github-actions bot added a commit that referenced this pull request Dec 20, 2025
- Remove bloated manual tool installs, use taiki-e/install-action@v2
- Enforce DL3015: add --no-install-recommends to service/Dockerfile
- Add static analysis tools to just setup output
- Document taplo.toml false flags with explanatory comments

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <[email protected]>
@icook
Copy link
Owner Author

icook commented Dec 20, 2025

Addressed all review feedback in 86e4b07:

  1. Install tools bloat - Replaced wget/curl manual installs with single taiki-e/install-action@v2 step for all 4 tools

  2. DL3015 (--no-install-recommends) - Removed from ignore list and added to service/Dockerfile

  3. just setup - Now shows installation status and install commands for static analysis tools

  4. taplo.toml false flags - Added explanatory comments for each disabled option

github-actions bot added a commit that referenced this pull request Dec 20, 2025
Replace verbose GITHUB_STEP_SUMMARY output with simple tool calls.
Use set -x for visibility into what's being run.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[DX] Add lightweight static analysis tools (typos, taplo, hadolint, actionlint, shellcheck)

2 participants