Skip to content

Fixes #294 - selectively exclude hidden directories#560

Merged
fwcd merged 1 commit into
fwcd:mainfrom
tony-sol:main
Mar 8, 2024
Merged

Fixes #294 - selectively exclude hidden directories#560
fwcd merged 1 commit into
fwcd:mainfrom
tony-sol:main

Conversation

@tony-sol

Copy link
Copy Markdown
Contributor

Fixes #294 (partly): Selectively exclude hidden directories instead of all hidden files and dirs (mainly, to make it easier to work with Teamcity Kotlin DSL)

val excludedPatterns = (listOf(
".git", ".hg", ".svn", // Version control systems
".idea", ".idea_modules", ".vs", ".vscode", ".code-workspace", ".settings", // IDEs
"bazel-*", "bin", "build", "node_modules", "target", // Build systems

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

Hm, I would rather integrate with .gitignore or a custom file (e.g. .klsignore) than adding to this ever-growing list of hardcoded directories... my worry is that directory names like target are already so generic, that there might be non-Maven-projects that place their source code there, for example

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Yeah, i noticed your TODO for it, and this is really a problem

I'm not sure about reading .gitignore, because some autogenerated files may be ignored, but should be loaded as sources - just like you worry about target.

Consider this PR more like "hotfix" rather than solid improvement:)

@fwcd fwcd Mar 8, 2024

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

Yeah I agree, in the long term we have got to come up with a proper solution... but for now this fix shouldn't hurt.

@stevenrchun

Copy link
Copy Markdown

I've attempted that "proper solution" here #574 which is ready for review.

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.

Kotlin files in dot directories not indexed

3 participants