-
Notifications
You must be signed in to change notification settings - Fork 0
Feature/001 logs linter #2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
29 commits
Select commit
Hold shift + click to select a range
6cc1db0
chore: add .gitignore (exclude all except README and .gitignore)
rTexty 00e972e
chore: initialize Go module baseline
rTexty dc091a2
chore: ignore local context artifacts
rTexty e755356
feat: add analyzer package skeleton
rTexty 5acf938
feat: add standalone CLI entrypoint
rTexty 12a32f1
chore: add golangci-lint plugin config examples
rTexty a0e41ca
test: add lowercase and ASCII rule coverage
rTexty d847a88
test: add punctuation and sensitive data rule coverage
rTexty 4b450af
test: add message extraction coverage
rTexty c256baf
feat: define stable analyzer rules
rTexty 5dcd48e
feat: normalize extracted message literals
rTexty ad506d8
chore: add repository automation and GitHub policies
rTexty 349deb1
chore: add release workflow and README badges
rTexty f5a010a
chore: add changelog and release notes policy
rTexty bb01838
feat: add diagnostics builder and deduplication
rTexty cf31da4
test: add slog analysistest fixtures
rTexty df4aebf
test: add zap analysistest fixtures
rTexty 68c5f43
test: add mixed analysistest fixtures
rTexty a5addb2
feat: classify supported slog logger calls
rTexty 5644c25
feat: classify supported zap logger calls
rTexty fe7285e
feat: wire analyzer traversal and reporting
rTexty e8a2d09
test: add analyzer integration coverage
rTexty f41e145
feat: add analyzer config scaffold
rTexty 1480957
style: normalize file formatting and newlines
rTexty 01092d7
docs: expand README for analyzer usage
rTexty ca091d1
docs: add golangci-lint module plugin workflow
rTexty 2afd859
style: run goimports cleanup
rTexty 603bc06
fix: make golangci-lint module plugin buildable
rTexty f80e8f1
docs: add release readiness notes
rTexty File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,8 @@ | ||
| version: v2.11.2 | ||
| name: custom-golangci-lint | ||
| destination: ./bin | ||
|
|
||
| plugins: | ||
| - module: github.com/rTexty/logsLinter | ||
| import: github.com/rTexty/logsLinter/plugin | ||
| path: . | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,16 @@ | ||
| root = true | ||
|
|
||
| [*.{go,md,yml,yaml}] | ||
| charset = utf-8 | ||
| end_of_line = lf | ||
| insert_final_newline = true | ||
| indent_style = tab | ||
| indent_size = 4 | ||
| trim_trailing_whitespace = true | ||
|
|
||
| [*.{md,yml,yaml}] | ||
| indent_style = space | ||
| indent_size = 2 | ||
|
|
||
| [Makefile] | ||
| indent_style = tab |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| * @rTexty |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,27 @@ | ||
| name: Bug report | ||
| description: Report a defect or regression. | ||
| title: "bug: " | ||
| labels: | ||
| - bug | ||
| body: | ||
| - type: textarea | ||
| id: description | ||
| attributes: | ||
| label: Description | ||
| description: What is broken and what did you expect instead? | ||
| validations: | ||
| required: true | ||
| - type: textarea | ||
| id: reproduction | ||
| attributes: | ||
| label: Reproduction | ||
| description: Minimal steps or sample code that reproduces the issue. | ||
| validations: | ||
| required: true | ||
| - type: textarea | ||
| id: environment | ||
| attributes: | ||
| label: Environment | ||
| description: Go version, OS, and any relevant tooling. | ||
| validations: | ||
| required: true |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| blank_issues_enabled: false | ||
| contact_links: | ||
| - name: Security issue | ||
| url: https://github.com/rTexty/logsLinter/security/advisories/new | ||
| about: Report undisclosed vulnerabilities through private security reporting. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,25 @@ | ||
| name: Feature request | ||
| description: Propose a new capability or improvement. | ||
| title: "feat: " | ||
| labels: | ||
| - enhancement | ||
| body: | ||
| - type: textarea | ||
| id: problem | ||
| attributes: | ||
| label: Problem | ||
| description: What problem are you trying to solve? | ||
| validations: | ||
| required: true | ||
| - type: textarea | ||
| id: proposal | ||
| attributes: | ||
| label: Proposal | ||
| description: Describe the desired behavior or API. | ||
| validations: | ||
| required: true | ||
| - type: textarea | ||
| id: alternatives | ||
| attributes: | ||
| label: Alternatives | ||
| description: What alternatives did you consider? |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,2 @@ | ||
| self-hosted-runner: | ||
| labels: [] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,19 @@ | ||
| version: 2 | ||
| updates: | ||
| - package-ecosystem: gomod | ||
| directory: "/" | ||
| schedule: | ||
| interval: weekly | ||
| open-pull-requests-limit: 5 | ||
| labels: | ||
| - dependencies | ||
| - github-actions | ||
|
|
||
| - package-ecosystem: github-actions | ||
| directory: "/" | ||
| schedule: | ||
| interval: weekly | ||
| open-pull-requests-limit: 5 | ||
| labels: | ||
| - dependencies | ||
| - github-actions |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,21 @@ | ||
| ## Summary | ||
|
|
||
| - | ||
|
|
||
| ## Verification | ||
|
|
||
| - [ ] `go test ./...` | ||
| - [ ] `go build ./...` | ||
| - [ ] relevant docs updated | ||
| - [ ] changelog or release-notes impact considered | ||
|
|
||
| ## Checklist | ||
|
|
||
| - [ ] no secrets or sensitive data added | ||
| - [ ] no unrelated files changed | ||
| - [ ] CI is expected to pass | ||
|
|
||
| ## Release Notes | ||
|
|
||
| - Suggested label category: | ||
| - Changelog entry needed: yes / no |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,37 @@ | ||
| changelog: | ||
| exclude: | ||
| labels: | ||
| - skip-release-notes | ||
| - github-actions | ||
|
|
||
| categories: | ||
| - title: Breaking Changes | ||
| labels: | ||
| - breaking-change | ||
|
|
||
| - title: Features | ||
| labels: | ||
| - enhancement | ||
| - feature | ||
|
|
||
| - title: Fixes | ||
| labels: | ||
| - bug | ||
| - fix | ||
|
|
||
| - title: Security | ||
| labels: | ||
| - security | ||
|
|
||
| - title: Documentation | ||
| labels: | ||
| - documentation | ||
|
|
||
| - title: Maintenance | ||
| labels: | ||
| - chore | ||
| - dependencies | ||
|
|
||
| - title: Other Changes | ||
| labels: | ||
| - "*" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,24 @@ | ||
| name: Workflow Lint | ||
|
|
||
| on: | ||
| push: | ||
| paths: | ||
| - ".github/workflows/**" | ||
| - ".github/actionlint.yaml" | ||
| pull_request: | ||
| paths: | ||
| - ".github/workflows/**" | ||
| - ".github/actionlint.yaml" | ||
|
|
||
| permissions: | ||
| contents: read | ||
|
|
||
| jobs: | ||
| actionlint: | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - name: Checkout | ||
| uses: actions/checkout@v4 | ||
|
|
||
| - name: Run actionlint | ||
| uses: raven-actions/actionlint@v2 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,54 @@ | ||
| name: CI | ||
|
|
||
| on: | ||
| push: | ||
| branches: | ||
| - main | ||
| - master | ||
| - feature/** | ||
| pull_request: | ||
|
|
||
| permissions: | ||
| contents: read | ||
|
|
||
| jobs: | ||
| build-test: | ||
| runs-on: ubuntu-latest | ||
| timeout-minutes: 15 | ||
|
|
||
| steps: | ||
| - name: Checkout | ||
| uses: actions/checkout@v4 | ||
|
|
||
| - name: Setup Go | ||
| uses: actions/setup-go@v5 | ||
| with: | ||
| go-version-file: go.mod | ||
| cache: true | ||
|
|
||
| - name: Verify formatting | ||
| run: | | ||
| unformatted="$(gofmt -l .)" | ||
| if [ -n "$unformatted" ]; then | ||
| echo "Unformatted files:" | ||
| echo "$unformatted" | ||
| exit 1 | ||
| fi | ||
|
|
||
| - name: Download modules | ||
| run: go mod download | ||
|
|
||
| - name: Vet | ||
| run: go vet ./... | ||
|
|
||
| - name: Test | ||
| run: go test ./... -race -count=1 | ||
|
|
||
| - name: Build | ||
| run: go build ./... | ||
|
|
||
| - name: Lint repository code | ||
| uses: golangci/golangci-lint-action@v8 | ||
| with: | ||
| version: v2.1 | ||
| args: --config=.golangci.repo.yml | ||
|
Comment on lines
+50
to
+54
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,41 @@ | ||
| name: CodeQL | ||
|
|
||
| on: | ||
| push: | ||
| branches: | ||
| - main | ||
| - master | ||
| pull_request: | ||
| schedule: | ||
| - cron: "17 3 * * 1" | ||
|
|
||
| permissions: | ||
| actions: read | ||
| contents: read | ||
| security-events: write | ||
|
|
||
| jobs: | ||
| analyze: | ||
| runs-on: ubuntu-latest | ||
| timeout-minutes: 20 | ||
|
|
||
| strategy: | ||
| fail-fast: false | ||
| matrix: | ||
| language: | ||
| - go | ||
|
|
||
| steps: | ||
| - name: Checkout | ||
| uses: actions/checkout@v4 | ||
|
|
||
| - name: Initialize CodeQL | ||
| uses: github/codeql-action/init@v3 | ||
| with: | ||
| languages: ${{ matrix.language }} | ||
|
|
||
| - name: Autobuild | ||
| uses: github/codeql-action/autobuild@v3 | ||
|
|
||
| - name: Perform CodeQL analysis | ||
| uses: github/codeql-action/analyze@v3 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,18 @@ | ||
| name: Dependency Review | ||
|
|
||
| on: | ||
| pull_request: | ||
|
|
||
| permissions: | ||
| contents: read | ||
| pull-requests: read | ||
|
|
||
| jobs: | ||
| dependency-review: | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - name: Checkout | ||
| uses: actions/checkout@v4 | ||
|
|
||
| - name: Dependency review | ||
| uses: actions/dependency-review-action@v4 |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Local
custom-golangci-lintis pinned tov2.11.2, while CI runs golangci-lintv2.1. If both are meant to be used for the same checks, this drift can cause "works locally, fails in CI" behavior; consider pinning a single version or documenting why they differ.