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

Add yangPathIgnore setting #240

Merged
merged 1 commit into from
Apr 15, 2024
Merged

Conversation

esmasth
Copy link
Contributor

@esmasth esmasth commented Apr 1, 2024

This allows for exclusion of specific subdirs or files under the dirs
specified via yangPath.

Also formatted markdown files to fix markdownlint issues.

This addresses #232

Signed-off-by: Siddharth Sharma siddharth.sharma@ericsson.com

@esmasth esmasth changed the title Add yangIgnorePath setting Add yangPathIgnore setting Apr 2, 2024
@esmasth esmasth force-pushed the esmasth/issue232 branch 7 times, most recently from 6bde50c to 6ebcb0d Compare April 9, 2024 10:06
@esmasth esmasth marked this pull request as ready for review April 9, 2024 10:09
Copy link
Contributor Author

@esmasth esmasth left a comment

Choose a reason for hiding this comment

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

@dhuebner Ready for review

Copy link
Member

@dhuebner dhuebner left a comment

Choose a reason for hiding this comment

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

Looks good to me.
@esmasth
It will not affect existing users who are not using the new preference, right?

else if (file.name.endsWith('.yang'))
resourceSet.getResource(URI.createFileURI(file.absolutePath), true)
else if (file.name.endsWith('.zip')) {
} else if (file.name.endsWith('.zip')) {
Copy link
Member

Choose a reason for hiding this comment

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

I think you need to check if it is a file isFile. Otherwise it will match directories named e.g. some.zip

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fixed in the latest patch

Copy link
Member

@dhuebner dhuebner left a comment

Choose a reason for hiding this comment

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

Could you please add isFile or !isDirectory check?

@esmasth
Copy link
Contributor Author

esmasth commented Apr 12, 2024

Looks good to me. @esmasth It will not affect existing users who are not using the new preference, right?

I don't think it should affect existing users.

This allows for exclusion of specific subdirs or files under the dirs
specified via `yangPath`.

Also added github ci checks markdown files to fix markdownlint issues.

This addresses TypeFox#232

Signed-off-by: Siddharth Sharma <siddharth.sharma@ericsson.com>
@dhuebner dhuebner merged commit 5d25b3f into TypeFox:master Apr 15, 2024
2 checks passed
@dhuebner
Copy link
Member

Thanks @esmasth !

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.

2 participants