Skip to content

chore: update linting scope#1852

Merged
TerryHowe merged 1 commit intooras-project:mainfrom
TerryHowe:advanced-lint
Nov 26, 2025
Merged

chore: update linting scope#1852
TerryHowe merged 1 commit intooras-project:mainfrom
TerryHowe:advanced-lint

Conversation

@TerryHowe
Copy link
Copy Markdown
Member

What this PR does / why we need it:

Add some additional lint checks.

@codecov
Copy link
Copy Markdown

codecov bot commented Sep 11, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 87.29%. Comparing base (0fbecc4) to head (c9a7e61).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #1852   +/-   ##
=======================================
  Coverage   87.29%   87.29%           
=======================================
  Files         143      143           
  Lines        5535     5535           
=======================================
  Hits         4832     4832           
  Misses        417      417           
  Partials      286      286           

☔ View full report in Codecov by Sentry.
📢 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.

@TerryHowe
Copy link
Copy Markdown
Member Author

codecov/patch is not useful here

Copy link
Copy Markdown
Contributor

@shizhMSFT shizhMSFT left a comment

Choose a reason for hiding this comment

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

LGTM with suggestions

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

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 introduces additional linting rules and configuration to improve code quality. The changes include setting up a comprehensive golangci-lint configuration file and applying various linting fixes throughout the codebase.

  • Adds a comprehensive .golangci.yml configuration file with multiple linters enabled
  • Fixes import grouping and organization across multiple files
  • Updates test helper functions to include t.Helper() calls and simplifies temporary directory/file handling

Reviewed Changes

Copilot reviewed 11 out of 12 changed files in this pull request and generated no comments.

Show a summary per file
File Description
.golangci.yml New comprehensive linting configuration with multiple linters enabled
internal/testutils/fetcher.go Adds blank line to separate import groups
internal/testutils/error_fetcher.go Reorganizes imports with proper grouping
internal/io/tar_utils_test.go Simplifies temp directory handling using t.TempDir()
cmd/oras/root/manifest/index/create_test.go Adds t.Helper() calls to test helper functions
cmd/oras/root/cp_test.go Replaces inline struct literal with variable assignment
cmd/oras/internal/option/packer_test.go Adds t.Helper() call to test helper function
cmd/oras/internal/display/status/text_test.go Adds t.Helper() call to test helper function
cmd/oras/internal/display/status/progress/status_test.go Adds t.Helper() calls to test helper functions
cmd/oras/internal/display/status/console/console_test.go Adds t.Helper() calls to test helper functions
cmd/oras/internal/display/metadata/descriptor/manifest_fetch.go Reorganizes imports with proper grouping

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

Copy link
Copy Markdown
Member

@Wwwsylvia Wwwsylvia left a comment

Choose a reason for hiding this comment

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

LGTM

@FeynmanZhou
Copy link
Copy Markdown
Member

Hi @TerryHowe, are we able to merge this PR? You may want to rebase it before merging. Thanks

@TerryHowe
Copy link
Copy Markdown
Member Author

New problem was introduced, so I've had to update.

@TerryHowe TerryHowe added this to the v1.4.0 milestone Nov 23, 2025
Signed-off-by: Terry Howe <terrylhowe@gmail.com>
@TerryHowe TerryHowe merged commit 6c3e3e5 into oras-project:main Nov 26, 2025
8 checks passed
@TerryHowe TerryHowe deleted the advanced-lint branch November 26, 2025 12:24
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.

5 participants