Skip to content

docs: add architecture overview and golangci-lint tooling - #1359

Open
Tatsinnit wants to merge 2 commits into
notaryproject:mainfrom
Tatsinnit:docs/architecture-and-lint-tooling
Open

docs: add architecture overview and golangci-lint tooling#1359
Tatsinnit wants to merge 2 commits into
notaryproject:mainfrom
Tatsinnit:docs/architecture-and-lint-tooling

Conversation

@Tatsinnit

@Tatsinnit Tatsinnit commented Aug 2, 2026

Copy link
Copy Markdown

Description

This contribution is scoped for a minor update and possible latter minor release — it contains no source code, CLI, dependency, or Go-version changes, only documentation and additive developer/CI tooling.

Documentation

  • Add ARCHITECTURE.md — a map of the codebase: high-level architecture, package layout (cmd/notation, cmd/notation/internal, internal), core sign/verify workflows, trust model, developer workflow, and improvement opportunities.
  • Link ARCHITECTURE.md from README.md (Development and Contributing) and building.md.

Developer / CI tooling (additive, non-breaking)

  • Add .golangci.yml (golangci-lint v2) with a conservative linter set. Adopted incrementally via new-from-rev: HEAD, so only newly introduced issues fail CI — the existing backlog is not enforced.
  • Add a make lint target.
  • Add a Lint step to build.yml (golangci-lint-action v8, lint v2.5.0), and set fetch-depth: 0 on checkout so new-from-rev gating has the git history it needs.

Why it is safe for a minor release

  • No changes under cmd/ or internal/ — no behavior, API, or CLI-flag changes.
  • No go.mod/dependency or Go toolchain changes.
  • Lint gate is non-breaking by design (new-from-rev), so it cannot fail on the pre-existing backlog.

Signed commits ✅

Add ARCHITECTURE.md documenting the codebase map, package layout, core
sign/verify workflows, trust model, and developer workflow, linked from
README.md and building.md.

Add golangci-lint tooling: a conservative .golangci.yml adopted
incrementally via new-from-rev, a 'lint' Makefile target, and a CI lint
step (with fetch-depth: 0 so new-from-rev gating has git history).

Signed-off-by: Tatsat Mishra <tamishra@microsoft.com>
@codecov

codecov Bot commented Aug 2, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 79.09%. Comparing base (51ff5ec) to head (9a053f4).

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #1359   +/-   ##
=======================================
  Coverage   79.09%   79.09%           
=======================================
  Files          68       68           
  Lines        3076     3076           
=======================================
  Hits         2433     2433           
  Misses        436      436           
  Partials      207      207           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

This PR adds an architecture overview document and introduces additive Go lint tooling/CI wiring to improve contributor onboarding and maintain code quality without enforcing the existing lint backlog.

Changes:

  • Add ARCHITECTURE.md and link it from README.md and building.md.
  • Add a make lint target and a golangci-lint v2 configuration.
  • Add a golangci-lint GitHub Actions step and adjust checkout depth for new-issues gating.

Reviewed changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
README.md Adds a top-level link to the new architecture overview document.
Makefile Introduces a lint target for running golangci-lint locally.
building.md Links to ARCHITECTURE.md for codebase structure context.
ARCHITECTURE.md New architecture and workflow documentation for the codebase.
.golangci.yml Adds golangci-lint v2 configuration intended for incremental adoption.
.github/workflows/build.yml Adds CI lint step and ensures git history is available for new-issues gating.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread .golangci.yml Outdated
Comment thread .github/workflows/build.yml
Comment thread ARCHITECTURE.md Outdated
new-from-rev: HEAD compares the tree against itself, producing an empty
diff so no PR-introduced issues are ever reported. Switch to
new-from-merge-base: origin/main so lint issues introduced by a PR are
caught while the pre-existing backlog stays unenforced. Update the
build.yml checkout comment and ARCHITECTURE.md to match.

Signed-off-by: Tatsat Mishra <tamishra@microsoft.com>
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.

2 participants