Skip to content

.editorconfig files with syntax errors can cause property lookup to fail, even if the file is in a directory beneath the "root" config #55

@craigbarnes

Description

@craigbarnes

The current logic in the ini_handler() function seems to be to check every directory beneath the target directory for an .editorconfig file, from /.editorconfig upwards. If it encounters a config with root=true it clears the previous values and continues the traversal. If it encounters a file with INI syntax errors, it stops traversing at that directory and returns an error code.

This logic allows an .editorconfig file that shouldn't have any effect at all on the return value (because it's in a directory beneath the root config) to effectively prevent all property lookups in every directory above it.

I realize this is a weird edge case and fairly unlikely to happen, but I think it's worth mentioning anyway.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions