Exclude webapp/node_modules from go vet scans#1291
Closed
nevyangelova wants to merge 1 commit intomasterfrom
Closed
Exclude webapp/node_modules from go vet scans#1291nevyangelova wants to merge 1 commit intomasterfrom
nevyangelova wants to merge 1 commit intomasterfrom
Conversation
Third-party npm packages (e.g. flatted v3.4.2) can ship .go files that fail the Mattermost license header check. Filter go vet to only scan server packages. Made-with: Cursor
|
Caution Review failedThe pull request is closed. ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository UI (base), Organization UI (inherited) Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughThe Makefile's golangci-lint prerequisite vet commands have been updated to run Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~5 minutes ✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
webapp/node_modulesfromgo vetscans in the Makefile by filtering throughgo listand excluding/webapp/packages.flattedv3.4.2) can ship.gofiles that fail the Mattermost license header check. This unblocks dependabot PRs like Bump flatted from 3.3.3 to 3.4.2 in /webapp #1289.Test plan
Made with Cursor
Change Impact: 🟢 Low
Reasoning: This is an isolated build-time change that adds a defensive filter to exclude webapp packages from
go vetscans. The modification only affects which code paths are analyzed during linting, not the actual server code or runtime behavior. The change directly addresses a known issue with third-party npm packages containing.gofiles with missing license headers.Regression Risk: Minimal. The change filters out
webapp/node_modulesfromgo vetanalysis by appending| grep -v /webapp/to thego list ./...command in two places. This is purely a scope adjustment for the linter and doesn't alter what gets built or tested in the server code. The grep filter is a simple, well-established pattern with negligible failure risk. No shared dependencies, APIs, or core logic paths are affected.QA Recommendation: Manual QA can be skipped. Verification should focus on: (1) confirming that the CI lint check passes successfully, and (2) re-running the dependent Dependabot PR (#1289 for flatted v3.4.2) to verify it now passes without license header violations. The change is mechanical and its success criteria are clearly defined—the build pipeline simply needs to complete without style check failures.