fix: resolve architecture violations by relocating DismissButton#690
Closed
sonarqube-agent[bot] wants to merge 1 commit into
Closed
fix: resolve architecture violations by relocating DismissButton#690sonarqube-agent[bot] wants to merge 1 commit into
sonarqube-agent[bot] wants to merge 1 commit into
Conversation
Fixed issues: - AZ5s2AtzsmFUYkBRYERW for tsarchitecture:S7788 rule - AZ5s2AtzsmFUYkBRYERX for tsarchitecture:S7788 rule - AZ5s2AtzsmFUYkBRYERY for tsarchitecture:S7788 rule - AZ5s2AtzsmFUYkBRYERZ for tsarchitecture:S7788 rule - AZ5s2AtzsmFUYkBRYERa for tsarchitecture:S7788 rule Generated by SonarQube Agent (task: 7a6255bd-7362-436c-9251-e17240952d6a)
✅ Deploy Preview for echoes-react ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
Member
|
This is not the correct fix. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Relocated the DismissButton component from src/common/components/ to src/components/dismiss-button/ to resolve 5 MAJOR SonarQube architecture violations. This move converts disallowed cross-directory dependencies into permitted sibling-level references within the components directory structure.
View Project in SonarCloud
Fixed Issues
tsarchitecture:S7788 - Remove disallowed relationships to "ButtonTypes.ts" • MAJOR • View issue
Location:
src/common/components/DismissButton.tsx:25Why is this an issue?
This project has an intended architecture defined, which includes high-level components and their allowed relationships. This issue is being raised because a dependency in the code is not allowed since it constitutes an architecture deviation.
What changed
This hunk changes the import of DismissButton in Banner.tsx from '~common/components/DismissButton' to '../../dismiss-button/DismissButton', which is part of relocating the DismissButton component from src/common/components/ to src/components/dismiss-button/. By moving DismissButton into the src/components/ directory (alongside buttons, icons, and tooltip), the disallowed architectural relationships are resolved: DismissButton.tsx previously lived in src/common/components/ and imported from '../../components/buttons/Button', '../../components/buttons/ButtonStyles', '../../components/buttons/ButtonTypes', '../../components/icons', and '../../components/tooltip', all of which were flagged as architecture violations because files in the common/components directory were not allowed to depend on files in the components directory. After the relocation to src/components/dismiss-button/, those same imports become sibling-level references within the components directory, which are architecturally permitted. This hunk updates the consumer (Banner.tsx) to point to the new location, supporting the move that eliminates all five disallowed dependency relationships.
tsarchitecture:S7788 - Remove disallowed relationships to "Button.tsx" • MAJOR • View issue
Location:
src/common/components/DismissButton.tsx:23Why is this an issue?
This project has an intended architecture defined, which includes high-level components and their allowed relationships. This issue is being raised because a dependency in the code is not allowed since it constitutes an architecture deviation.
What changed
This hunk changes the import of DismissButton in Banner.tsx from '~common/components/DismissButton' to '../../dismiss-button/DismissButton', which is part of relocating the DismissButton component from src/common/components/ to src/components/dismiss-button/. By moving DismissButton into the src/components/ directory (alongside buttons, icons, and tooltip), the disallowed architectural relationships are resolved: DismissButton.tsx previously lived in src/common/components/ and imported from '../../components/buttons/Button', '../../components/buttons/ButtonStyles', '../../components/buttons/ButtonTypes', '../../components/icons', and '../../components/tooltip', all of which were flagged as architecture violations because files in the common/components directory were not allowed to depend on files in the components directory. After the relocation to src/components/dismiss-button/, those same imports become sibling-level references within the components directory, which are architecturally permitted. This hunk updates the consumer (Banner.tsx) to point to the new location, supporting the move that eliminates all five disallowed dependency relationships.
tsarchitecture:S7788 - Remove disallowed relationships to "ButtonStyles.tsx" • MAJOR • View issue
Location:
src/common/components/DismissButton.tsx:24Why is this an issue?
This project has an intended architecture defined, which includes high-level components and their allowed relationships. This issue is being raised because a dependency in the code is not allowed since it constitutes an architecture deviation.
What changed
This hunk changes the import of DismissButton in Banner.tsx from '~common/components/DismissButton' to '../../dismiss-button/DismissButton', which is part of relocating the DismissButton component from src/common/components/ to src/components/dismiss-button/. By moving DismissButton into the src/components/ directory (alongside buttons, icons, and tooltip), the disallowed architectural relationships are resolved: DismissButton.tsx previously lived in src/common/components/ and imported from '../../components/buttons/Button', '../../components/buttons/ButtonStyles', '../../components/buttons/ButtonTypes', '../../components/icons', and '../../components/tooltip', all of which were flagged as architecture violations because files in the common/components directory were not allowed to depend on files in the components directory. After the relocation to src/components/dismiss-button/, those same imports become sibling-level references within the components directory, which are architecturally permitted. This hunk updates the consumer (Banner.tsx) to point to the new location, supporting the move that eliminates all five disallowed dependency relationships.
tsarchitecture:S7788 - Remove disallowed relationships to "index.ts" • MAJOR • View issue
Location:
src/common/components/DismissButton.tsx:26Why is this an issue?
This project has an intended architecture defined, which includes high-level components and their allowed relationships. This issue is being raised because a dependency in the code is not allowed since it constitutes an architecture deviation.
What changed
This hunk changes the import of DismissButton in Banner.tsx from '~common/components/DismissButton' to '../../dismiss-button/DismissButton', which is part of relocating the DismissButton component from src/common/components/ to src/components/dismiss-button/. By moving DismissButton into the src/components/ directory (alongside buttons, icons, and tooltip), the disallowed architectural relationships are resolved: DismissButton.tsx previously lived in src/common/components/ and imported from '../../components/buttons/Button', '../../components/buttons/ButtonStyles', '../../components/buttons/ButtonTypes', '../../components/icons', and '../../components/tooltip', all of which were flagged as architecture violations because files in the common/components directory were not allowed to depend on files in the components directory. After the relocation to src/components/dismiss-button/, those same imports become sibling-level references within the components directory, which are architecturally permitted. This hunk updates the consumer (Banner.tsx) to point to the new location, supporting the move that eliminates all five disallowed dependency relationships.
tsarchitecture:S7788 - Remove disallowed relationships to "index.ts" • MAJOR • View issue
Location:
src/common/components/DismissButton.tsx:27Why is this an issue?
This project has an intended architecture defined, which includes high-level components and their allowed relationships. This issue is being raised because a dependency in the code is not allowed since it constitutes an architecture deviation.
What changed
This hunk changes the import of DismissButton in Banner.tsx from '~common/components/DismissButton' to '../../dismiss-button/DismissButton', which is part of relocating the DismissButton component from src/common/components/ to src/components/dismiss-button/. By moving DismissButton into the src/components/ directory (alongside buttons, icons, and tooltip), the disallowed architectural relationships are resolved: DismissButton.tsx previously lived in src/common/components/ and imported from '../../components/buttons/Button', '../../components/buttons/ButtonStyles', '../../components/buttons/ButtonTypes', '../../components/icons', and '../../components/tooltip', all of which were flagged as architecture violations because files in the common/components directory were not allowed to depend on files in the components directory. After the relocation to src/components/dismiss-button/, those same imports become sibling-level references within the components directory, which are architecturally permitted. This hunk updates the consumer (Banner.tsx) to point to the new location, supporting the move that eliminates all five disallowed dependency relationships.
SonarQube Remediation Agent uses AI. Check for mistakes.