Skip to content
This repository has been archived by the owner on Apr 10, 2021. It is now read-only.

File reformatting is not triggered by all editorconfig rules #88

Open
ZaLiTHkA opened this issue Sep 21, 2015 · 3 comments
Open

File reformatting is not triggered by all editorconfig rules #88

ZaLiTHkA opened this issue Sep 21, 2015 · 3 comments

Comments

@ZaLiTHkA
Copy link

I just tried the 0.0.8 version and the changes introduced in #86 don't seem to work too well.. If I open an existing file and add code that doesn't have the correct indentation, saving the file like that doesn't reformat. However, if the file contents force one of the other formatting properties to update, then the line indentation also updates.

Details from my IDE "About" modal:

Product Version: NetBeans IDE 8.0.2 (Build 201411181905)
Updates: NetBeans IDE is updated to version NetBeans 8.0.2 Patch 2
Java: 1.8.0_45; Java HotSpot(TM) Client VM 25.45-b02
Runtime: Java(TM) SE Runtime Environment 1.8.0_45-b15
System: Windows 8 version 6.2 running on x86; Cp1252; en_ZA (nb)

I've verified through the IDE logs that there are no errors being logged and other than this one issue, the plugin operates as expected. Using a standard Java SE project with the following .editorconfig file in my project's Java source folder:

root = true

[*.java]
charset = utf-8
indent_style = space
indent_size = 4
insert_final_newline = true
trim_trailing_whitespace = true
  • If I enter code with the incorrect indentation, the file indentation is not updated on save.
  • If I change any other formatting option, the file indentation is updated on save. This includes:
    • remove the final newline character
    • add whitespace to the end of any line

Is this known behaviour?

@Yserz
Copy link
Member

Yserz commented Oct 4, 2015

Thx for reporting! This bug should be fixed in the latest sources. Would you mind to try the fix from the sources and let me know if you have any further problems?

@bennycode
Copy link
Member

@ZaLiTHkA Can you please download v0.0.9-beta to check if your problem got solved?

@ZaLiTHkA
Copy link
Author

My apologies @Yserz, not sure how I missed your message.. Would've checked this quite a while back if I'd realised you had a fix. :)

@bennyn, I don't have this issue any more with 0.0.9-beta, only tested with .java files, but since this isn't something that's file specific I doubt that will make much difference.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants