It ended up being because tabs were used elsewhere in the file and it was trying to do smart indentation or something frustrating. When I faced this problem I had “use spaces for tabs” set to true everywhere I could find, and yet I was still getting tabs. In the java formatter link, you have to edit the profileĪnd select the tab policy, spaces only in indentation tab In Eclipse go to Window » Preferences then search for Formatter.Īnd set it to use spaces instead of tabs. I checked only the latter thing and left the Combobox as Tabs Only which kept failing CheckStyle.įYI, I’m talking about Preferences > Java > Formatter > Edit… This will generally only be an issue if you import someone else’s code into your Eclipse. Turn off all the project-specific options.Right-Click current Project in Package Explorer.Just a quick tip for people stumbling across this thread there is one more place where this setting can also be set, in your project!Įclipse supports project-specific settings, and some projects will use their own, un-managed tabs/spaces settings, which won’t show up anywhere except the current project Properties. Java » Preferences » Code Style » Formatter » Edit » Indentation (choose “spaces only”).Rename the formatter settings profile to save it.Javascript » Preferences » Code Style » Formatter » Edit » Indentation (choose “spaces only”).XML » XML Files » Editor » Indentation size (set to 4).XML » XML Files » Editor » Indent using spaces (select it).Web » HTML » Editor » Indentation size (set to 4).Web » HTML » Editor » Indent using spaces (select it).Web » CSS » Editor » Indentation size (set to 4).Web » CSS » Editor » Indent using spaces (select it).PHP » Code Style » Formatter » Indentation size (set to 4).PHP » Code Style » Formatter » Tab policy (choose “spaces”).
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |