Releases: FPtje/GLuaFixer
1.29.0
Bug fixes
- Fix accepting empty expression vars as variables #177
- Fix unnecessary parentheses warning when in a return #179
- Fix glualint accepting things like
3do
, which glua itself marks as a syntax error #180
Changed
- Improve parse error messages
- Show quotes around unexpected tokens
- Place commas to disambiguate parts of the message
- The
ast-dump
command now produces a smaller output. Warning: if you relied on this, this change is backwards incompatible.
Refactors
- Use TemplateHaskell instead of Generics. This leads to significantly faster compile times
- @brandonsturgeon Updated the checkout and github-script of the glualint workflow #178
- Optimize the executable a little less hard. This is also for better compile times
- Use static-haskell to build static executables (
pkgsStatic
was no longer working) 9ff0259
Warning!
The aarch64-linux version is NO LONGER statically built! This means that there is a possibility that the executable does not work and fails to find some library.
I'd love to keep building static executables for ARM64, but the build infrastructure is just not there for Haskell. It has bit rotted I'm afraid.
1.28.0
Bug fixes
- Fixed pretty printing causing a syntax error when pretty printing some comments in if-statements. Example that went wrong before:
timer.Simple(60, function() if IsValid(ply) then a = 1 end end) -- This comment should not eat the end
Changed
-
Print function arguments on single line: #176. This is quite a big change. It appeared to be in quite big demand and is much more in line with how most Lua scripters write function calls:
BEFORE:
timer.Create( "name", 30, 0, function() -- comment here if true then return end end )
AFTER:
timer.Create("name", 30, 0, function() -- comment here if true then return end end)
Refactors
- Fixed the CI build of the OSX executable. It seems the machine type that was configured went out of use.
1.27.0
Bug fixes
- Fix regression where lint warnings were misplaced when double quoted strings (
"example"
) were on the same line: #169 - Fix pretty printing comments at the end of a block (e.g. when you comment out a
return
, it no longer moves that comment to outside the block): #173
Changes
- Make the region of the empty
if/elseif/else
warning bigger: #170 - Removed the error correcting parser. This means that the
prettyprint_rejectInvalidCode
is now alwaystrue
and has no effect anymore. The error correcting parser was annoying to maintain, and the corrections were not really sensible anyway. - Improve "Syntax Inconsistency" warning to always warn for both locations of the inconsistency. This should make it way easier to find where it actually conflicts: #174
Refactors
- Build infra: Build all tests when running
cabal build all
on the source. - Tests: The
linttest
unit test now runs on CI. - Haskell code: Remove some folding structures that work better with just a pattern match
1.26.0
Bug fixes
- Fixed lint settings being ignored when running
glualint lint .
as opposed toglualint lint <directory>
Changes
- Reworked the way glualint works with comments. Comments are now placed much closer to their original locations, especially if they were between arguments in function calls. See #163
- Changed multiline logic: functions are now considered multiline less often. See #163 for details
Refactors
- Added some CI to glualint, to make sure all the recently added tests pass
- Reformatted the pretty print AG code
- Added quite a few more tests for pretty printing
- Added test files to the library that is pushed to Hackage.
1.25.0
Quite a big release this time!
New features
- Added the ability to add
format: multiline
to code. When added, the next
statement will be forced to be rendered in multiline. This is useful to direct
glualint a little bit.
NOTE: This is the first iteration of this feature, and will likely have bugs and shortcomings. One known one is that it won't nicely format comments in tables. Please try it out and report issues when you find them! - Added a
dump-lexicon
command. This is useful for debugging parser problems in glualint.
Bug fixes
- Fix generating invalid Lua when pretty printing the calling of varargs (e.g.
(...)[...] = nil
) See #155 - Fixed the description of the
dump-ast
command when runningglualint --help
. It showed the description of printing globals - The pretty printer now properly adds a semicolon when omitting it would lead to code ambiguity. See #156
- Fixed the pretty printer adding a new line after the last element of the table if that last element had a comment after it. See #157
- Fixed labels with newlines in them causing lint warnings to be displayed at the wrong place
- Fixed strings with escaped newlines in them causing lint warnings to be displayed at the wrong place
Refactors
- Formatted a bunch of code with
fourmolu
- Added a bunch of golden tests for the pretty printer, to prevent regressions when adding new features
1.24.6
Bug fixes
- Fixed the legacy
--pretty-print
no longer defaulting to using stdin - Fixed parsing numbers like
0x1.a
, which have hexadecimals after the.
Other
This is the first version of glualint that's published on Hackage! https://hackage.haskell.org/package/glualint
1.24.5
Bug fixes
- Fixed regression from 1.24.4 where glualint goes in an infinite loop when there is no
glualint.json
- Fixed regression from 1.24.4 where
glualint foo.lua
would no longer work
Additions
- Added a
--debug
flag to enable some debug logging. This will be useful for reporting bugs. For now the debug log will show how it parsed the command line arguments, and which file operations it executes. - Added support for generating bash/zsh/fish completion scripts. Run
glualint --bash-completion-script $(which glualint)
to generate these. Replacebash
withzsh
orfish
to do the same for the respective shells. Place the completion script in your shell's autocompletions directory/file to make it work.
1.24.4
This release is a major refactor, but mostly the same as the previous version. There are some bug fixes:
- The config file passed in the CLI didn't seem to have any effect at all. This argument now works.
- interrupting the testing (
glualint test
) of a directory did not work. It would keep going. That's fixed now - Fixed
dump-ast
andtest
commands not working with stdin
It appears that the above issues were never noticed (or at least reported) by anyone. I came across them as I was doing the refactor.
Some other details of the refactor:
- Refactored the library part to be entirely pure. This means that all the parsing, linting etc. is in the library, but all the outside world interactions like file reading, file system traversal, file writing (in pretty print) is all in the executable portion of the program
- Cleaned up the Cabal file for uploading the glualint library to hackage.haskell.org
1.24.3
Bug fixes
- Fixed glualint throwing an error for strings like
"\z"
and"\z5"
. See #146
Miscellaneous improvements
- Updated the compiler to GHC 9.4. You may or may not notice a difference in performance.
- Updated a whole bunch of dependencies and build tools. You shouldn't notice a difference with glualint, hopefully.
- Modified Nix flake infrastructure to be friendlier to build glualint. This has no effect on the glualint executable.
- Fixed some linter warnings in glualint code, this should not affect the glualint executable
1.24.2
This release contains a fix for systems that have their system locale set to something other than UTF-8. GLualint's pretty-print feature would error saying that a file could not be parsed when this file contained UTF-8 specific code points. See #145 for details.
This bug was most likely noticeable for Windows installations that have their locale set to something non-UTF8.