Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding ChangeListManager to parse ignored Files in Project and sortin… #4453

Merged
merged 12 commits into from May 13, 2024

Conversation

ashishrp-aws
Copy link
Contributor

…g through project modules for accurate file parsing.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)

Description

  • Using ChangeListManager instead of featureDevSessionContext to do ignored file parsing.
  • Running through project modules to collect files instead of just collecting all children of projectRoot.

Checklist

  • My code follows the code style of this project
  • I have added tests to cover my changes
  • A short description of the change has been added to the CHANGELOG if the change is customer-facing in the IDE.
  • I have added metrics for my changes (if required)

License

I confirm that my contribution is made under the terms of the Apache 2.0 license.

…g through project modules for accurate file parsing.
@ashishrp-aws ashishrp-aws requested a review from a team as a code owner May 9, 2024 05:06

if (!current.isDirectory) {
// Using both featureDevSessionContext and changeListManager to ignore files.
// featureDevSessionContext is used to only ignore files in gitignore in project root and uses regex pattern matching.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why wouldn't we just rely on ChangeListManager? it is already gitignore aware

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

its not checking gitignore files in tests. so thought it'd be prudent to keep both in. i was trying choose to leave featureDevSessionContext in or out.

@ashishrp-aws ashishrp-aws requested a review from a team as a code owner May 10, 2024 01:36
Comment on lines -381 to -385

// Adding gitignore file and gitignore file member for testing.
// The tests include the markdown file but not these two files.
projectRule.fixture.addFileToProject("/.gitignore", "node_modules\n.idea\n.vscode\n.DS_Store").virtualFile
projectRule.fixture.addFileToProject("test.idea", "ref: refs/heads/main")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

need to figure out tests

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ack. i have been working to write tests including gitignore files.

Copy link

sonarcloud bot commented May 13, 2024

Quality Gate Passed Quality Gate passed

Issues
0 New issues
0 Accepted issues

Measures
0 Security Hotspots
No data about Coverage
2.1% Duplication on New Code

See analysis details on SonarCloud

@ashishrp-aws ashishrp-aws merged commit 761ce71 into aws:main May 13, 2024
10 of 11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants