Skip to content

Refactor/config setup#146

Merged
andrzej-janczak merged 2 commits intomainfrom
refactor/config-setup
Jun 10, 2025
Merged

Refactor/config setup#146
andrzej-janczak merged 2 commits intomainfrom
refactor/config-setup

Conversation

@andrzej-janczak
Copy link
Copy Markdown
Contributor

@andrzej-janczak andrzej-janczak commented Jun 9, 2025

I noticed some parts in cmd/configsetup/setup.go are copy pasted.

Also I think now the structure is clearer and simpler to undsetand - like e.g. the declarations of tools is on top.

I asked about this "strange" code like type pylintConfigCreator struct{} and interface
empty struct, he came up with this:

Current Approach Benefits
Zero magic - everything is explicit
Easy to debug - no hidden method calls
Tool independence - each tool is self-contained
Simple to understand - no need to understand composition patterns
Easy to test - mock individual creators without dependencies
The current design follows Go's philosophy of "A little copying is better than a little dependency" and prioritizes clarity over cleverness! 🎯

Looks like this is the standard way of GO...

@codacy-production
Copy link
Copy Markdown

codacy-production Bot commented Jun 9, 2025

Coverage summary from Codacy

See diff coverage on Codacy

Coverage variation Diff coverage
+0.17% 33.76%
Coverage variation details
Coverable lines Covered lines Coverage
Common ancestor commit (c691b6d) 5419 1406 25.95%
Head commit (68717ea) 5364 (-55) 1401 (-5) 26.12% (+0.17%)

Coverage variation is the difference between the coverage for the head and common ancestor commits of the pull request branch: <coverage of head commit> - <coverage of common ancestor commit>

Diff coverage details
Coverable lines Covered lines Diff coverage
Pull request (#146) 234 79 33.76%

Diff coverage is the percentage of lines that are covered by tests out of the coverable lines that the pull request added or modified: <covered lines added or modified>/<coverable lines added or modified> * 100%

See your quality gate settings    Change summary preferences

@andrzej-janczak andrzej-janczak force-pushed the refactor/config-setup branch from f51e48a to 71d4fc7 Compare June 9, 2025 13:46
@andrzej-janczak andrzej-janczak force-pushed the refactor/config-setup branch from 71d4fc7 to befeb5b Compare June 9, 2025 13:54
@andrzej-janczak andrzej-janczak merged commit 73c0a88 into main Jun 10, 2025
10 checks passed
@andrzej-janczak andrzej-janczak deleted the refactor/config-setup branch June 10, 2025 10:03
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