A Visual Studio Code extension that integrates Haxe Checkstyle to automatically analyze and enforce coding style rules within Haxe projects.
Haxe Checkstyle extension for Visual Studio Code
This tool is primarily used by Haxe developers to maintain consistent code style and quality by running style checks automatically when opening or saving files in VS Code. It helps developers identify and fix style violations quickly through diagnostics and quickfixes, improving code readability and maintainability.
The extension only detects violations in files that are opened in the editor, so some issues may not be visible until files are accessed. The CodeSimilarity check uses a ring buffer with a default size of 100 files, configurable via `haxecheckstyle.codeSimilarityBufferSize`. Per-folder configuration allows different style rules within the same workspace, enhancing flexibility.
Install the extension from the Visual Studio Marketplace via https://marketplace.visualstudio.com/items?itemName=vshaxe.haxe-checkstyle
Open VS Code and enable the extension
Configure `haxecheckstyle.sourceFolders` in VS Code settings if needed
Add or maintain `checkstyle.json` and `checkstyle-excludes.json` files in your project folders
Open or save a Haxe file in VS Code
Triggers haxe-checkstyle to run and display diagnostics for style violations
Apply quickfixes via VS Code lightbulb or code actions
Fixes style violations for supported checks such as Dynamic, EmptyPackage, Final, Indentation, ModifierOrder, RedundantModifier, StringLiteral, Trace, and UnusedImport