feat(go): Support golangci-lint via go tool#706
Conversation
|
Hello shwoop, I'll first merge the candidat that resolve requested changes first ( 612 vs 722 , 597 has not been selected as a candidat for this) Then ready to review your PR |
|
Blockers resolved |
308596c to
27e996f
Compare
I've refactored to add v2 support so ready for review. |
27e996f to
a4d9bcd
Compare
|
Added missing signoff. |
|
Hey We are cleaning up the codebase and improving the project structure for better onboarding. As part of this effort, PR #826 reorganizes No logic changes — only file moves and import path updates. What you need to doRebase your branch on git fetch origin && git rebase origin/developGit detects renames automatically. If you get import conflicts, update the paths: use crate::git; // now: use crate::cmds::git::git;
use crate::tracking; // now: use crate::core::tracking;
use crate::config; // now: use crate::core::config;
use crate::init; // now: use crate::hooks::init;
use crate::gain; // now: use crate::analytics::gain;Need help rebasing? Tag @aeppling |
As of go v1.24, tools such as golanci-lint can be managed via the mod file and called directly on the go binary via the tool subcommand. When called via tools, we now apply the same logic to compact the results as in the directly called command. Signed-off-by: shwoop <monkey.mambo.al.ferguson@gmail.com>
e7fdc61 to
8f985a2
Compare
|
Merged, will be available in next release. Thanks for your contribution @shwoop ! |
Summary
As of go v1.24, tools such as golanci-lint can be managed via the mod file and called directly on the go binary via the tool subcommand.
When called via tools, we now apply the same logic to compact the results as in the directly called command.
Resolves #744
Test plan
cargo fmt --all && cargo clippy --all-targets && cargo testrtk <command>output inspectedManual testing
I created a simple mock golang project:
golangci-lint is not impressed:
rtk currently (develop head) parrots the vanilla response:
Using this code, we see the truncated response:
In this scenario, we are not relying on the file on our path (as rtk golangci-lint does):
testing with v2
Same code as above but replacing golangci-lint with v2.