Weekly Report 2021/03/15
This is my 25th weekly report.
- refactor(no-this-before-super): rewrite with ast-view and assert macro
- refactor(no-setter-return): refine with ast-view and add sufficient tests
In rust-clippy, the new lint I proposed and implemented finally got merged into master. Here is the PR:
This lint seemed relatively easy to implement, but actually it was moderately challenging, which allowed me to learn a lot about how to implement a basic lint in clippy. Specifically, we should use
snippet_with_macro_callsite when we want to retrieve the original code snippet that could be a macro from Rust's intermediate representation - otherwise, we would end up getting a snippet with the macro expanded, which would not be suitable for the usage of showing a diagnostic message to users.
Overall, developing clippy's new rule has been a fantastic experience to me. I hope I'll contribute to it more and more.