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

Files that begin with . #74

Closed
sobolevn opened this issue Aug 13, 2019 · 6 comments
Closed

Files that begin with . #74

sobolevn opened this issue Aug 13, 2019 · 6 comments
Labels
bug Something isn't working released Feature/fix is released

Comments

@sobolevn
Copy link

Expected Behavior

I create this style preset:

[nitpick.files.".editorconfig"]
missing_message = "Create .editorconfig file"

I want to be sure that this file always exists.

Current Behavior

But, that's what I get:

» flake8 .

./tests/test_version.py

  1:1      NIP001 File editorconfig.toml has an incorrect style. Invalid TOML:
TomlDecodeError: Invalid group name 'editorconfig"'. Try quoting it. (line 3 column 1 char 30)
  # -*- coding: utf-8 -*-

How can I start filename with the . char?

@sobolevn sobolevn added the bug Something isn't working label Aug 13, 2019
@sobolevn
Copy link
Author

sobolevn commented Aug 13, 2019

Things I have tried: "\.editoconfig", "'.editorconfig'".
It compiles, but does not raise the missing file violation.

@andreoliwa
Copy link
Owner

I planned #9 to deal especially with .editorconfig.

For now, I will just fix this "dot" bug here.

@andreoliwa
Copy link
Owner

[nitpick.files.".editorconfig"]

How can I start filename with the . char?

I tried, and it would be more complicated to solve this in a clean way.

Things I have tried: "\.editoconfig", "'.editorconfig'".

The way the code is currently written, it would be hard to allow both of these variations and to map them back to .editorconfig.

So, for now, I opted to do a similar thing for present and absent files:
https://github.com/andreoliwa/nitpick#present-files
https://github.com/andreoliwa/nitpick#absent-files

@sobolevn
Copy link
Author

Much thanks, very awesome. 👍

andreoliwa pushed a commit that referenced this issue Aug 13, 2019

Verified

This commit was signed with the committer’s verified signature.
Farber98 Juan Farber
# [0.20.0](v0.19.0...v0.20.0) (2019-08-13)

### Bug Fixes

* report errors on line 0 instead of 1 ([31b13ea](31b13ea)), closes [#73](#73)

### Features

* add config to check files that should be present ([408440f](408440f)), closes [#74](#74)
@andreoliwa
Copy link
Owner

🎉 This issue has been resolved in version 0.20.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

@andreoliwa andreoliwa added the released Feature/fix is released label Aug 13, 2019
@sobolevn
Copy link
Author

Yes, it works 🎉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working released Feature/fix is released
Projects
Archived in project
Development

No branches or pull requests

2 participants