editorconfig-checker/editorconfig-checker.php

Wrong path constructor in rule getter

webit-dev opened this issue · 4 comments

Hey, just tested the master :)

The path constructor in the method to find a valid editorconfig is wrong: https://github.com/editorconfig-checker/editorconfig-checker.php/blob/master/src/EditorconfigChecker/Editorconfig/Editorconfig.php#L73

Lets say I run bin/editorconfig-checker test-folder/*, then the filelist returns a file like test-folder/test/testfile.php. The rootdir returns something like /home/johndoe/git/editorconfig.

The line above then builds a wrong filepath /home/johndoe/git/editorconfigest-folder/test/testfile.php instead of /home/johndoe/git/editorconfig/test-folder/test/testfile.php.

Therefore no editorconfig is found, no rules are build (ruleset is empty) and all files are returned as valid (“Successfully checked 30968 lines in 168 files :)”).

Thanks for you quick feedback!

QuickFix: run bin/editorconfig-checker ./test-folder/* instead

Somehow I only tested with leading ./ - will provide a fix asap :)

Fixed see: a928b1f

The fix does work, thanks :)

The autofix tools do now work as well 👍

(…moved this comment to issue #49)