Skip to content

Fix copy and paste bugs - #21

Open
alingse wants to merge 2 commits into
PacktPublishing:mainfrom
alingse-forks:fix-copy-and-paste
Open

Fix copy and paste bugs#21
alingse wants to merge 2 commits into
PacktPublishing:mainfrom
alingse-forks:fix-copy-and-paste

Conversation

@alingse

@alingse alingse commented Jan 10, 2024

Copy link
Copy Markdown

I was write a linter https://github.com/alingse/copyandpaste that detect the same code in different branch.

this is mostly a copy and paste things.

I search and post the popular repo in the github and run the workflow.

Here is this repo's result log.

Error: /home/runner/work/copyandpaste/copyandpaste/Go-for-DevOps/chapter/16/workflow/internal/service/jobs/register/tokenbucket/tokenbucket.go:61:4: Duplicate case body found for case "false": and case "true": Is it a copy and paste?
Error: /home/runner/work/copyandpaste/copyandpaste/Go-for-DevOps/chapter/8/rollout/lb/client/cli/cli.go:[7](https://github.com/alingse/copyandpaste/actions/runs/7476736381/job/20347830235#step:7:8)0:2: Duplicate case body found for case "removeBackend": and case "addBackend": Is it a copy and paste?

from the code context. I think these two is a bug.

@alingse

alingse commented Jan 16, 2024

Copy link
Copy Markdown
Author

@devigned need help

@devigned devigned closed this Jan 16, 2024
@devigned devigned reopened this Jan 16, 2024
@devigned

Copy link
Copy Markdown
Collaborator

@johnsiilver please take a look when you have a minute.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants