eaf-linter
eaf-linter copied to clipboard
🦜 Add Duplicate Detector
Idea
I just learned that duplicate lines are a problem in large codebases. So, we should make a system that detects duplicate chunks of code. This duplicate detector should not fire off if there are a few similar lines, but it should be triggered when an entire function is duplicated, or giant chunks of code are duplicated a bunch.
This detector can either be built using plaintext or by using the abstract syntax tree generated by the babel parser. I think that the system would be much more powerful if we build it using the babel parser.
https://linearb.io/blog/code-duplication/
Todo
- [ ] Build a system to detect important code chunks using the babel parser
- [ ] Store the important code chunks
- [ ] Check in the code where the important chunks of code are repeated