Skip to content
This repository was archived by the owner on Jul 16, 2023. It is now read-only.

feat: add method call chains support on ban-name ident #1034

Merged
merged 5 commits into from
Nov 29, 2022

Conversation

Hideart
Copy link
Contributor

@Hideart Hideart commented Oct 13, 2022

What is the purpose of this pull request? (put an "X" next to an item)

  • Documentation update
  • Bug fix
  • New rule
  • Changes an existing rule
  • Add autofixing to a rule
  • Add a CLI option
  • Add something to the core
  • Other, please explain:

What changes did you make? (Give an overview)

This PR extends the ban-name rule abilities to recursive search in method call chains. (ex: DateTime.now or StrangeClass.someField.subField etc.)
Ban-name rule's visitor will have a breadcrumb now and will compare breadcrumb node names with the rule ident.

Resolves the #927

IMPORTANT:
Tests passes, CLI works as expected. But the IDE does not highlight method call chains. I'm trying to figure out what's wrong

UPD:
Progress is here

@Hideart Hideart marked this pull request as draft October 13, 2022 18:30
@sonarqubecloud
Copy link

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
No Duplication information No Duplication information

@incendial incendial self-requested a review October 14, 2022 15:57
@incendial incendial added this to the 5.0.0 milestone Oct 14, 2022
@Hideart Hideart marked this pull request as ready for review October 15, 2022 19:19
@incendial incendial modified the milestones: 5.0.0, 5.1.0 Oct 31, 2022
@incendial
Copy link
Member

@Hideart I'll merge this as is and fix myself. Thank you for the contribution!

@incendial incendial merged commit 3b48b76 into dart-code-checker:master Nov 29, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants