This project adheres to Semantic Versioning.
- Added new
roblox_roact_dangling_connection, which will check for connections made in components without getting cleaned up.
0.26.1 - 2023-11-11
- Fixed
UDim2.new()firing theroblox_suspicious_udim2_newlint.
0.26.0 - 2023-11-11
- Added
table.moveandmath.tointegerto Lua 5.3 standard library - Added
bit32.*functions to Lua 5.2 standard library - Added
table.pack,rawlenandpackage.configto Lua 5.2 standard library - Added new
empty_looplint, which will check for empty loop blocks. - Added new
roblox_suspicious_udim2_newlint, which will warn when you pass in too few number of arguments toUDim2.new. roblox_incorrect_roact_usagenow lints for illegalNameproperty- Added
ignore_patternconfig toglobal_usage, which will ignore any global variables with names that match the pattern roblox_incorrect_roact_usagenow checks for incorrect Roact17'screateElementusage on variables namedReact. For Roact17 only,key,children, andrefare valid properties to Roblox instances.- Excludes are now respected for single files.
- Added
no-excludecli flag to disable excludes. - When given in standard library format, additional information now shows up in
incorrect_standard_library_usemissing required parameter errors. - Added new
mixed_tablelint, which will warn against mixed tables. - Added
bit32.byteswapto Luau standard library - Added
bufferlibrary to Luau standard library - Added
SharedTableto Roblox standard library
- Updated internal parser, which includes floor division (
//), more correct parsing of string interpolation with double braces, and better parsing of\zescapes.
string.packandstring.unpacknow have proper function signatures in the Lua 5.3 standard library.- Moved
math.logsecond argument addition from Lua 5.3 std lib to 5.2 std lib undefined_variablenow correctly errors when defining multiple methods in undefined tables- Corrected
os.exitdefinition in Lua 5.2 standard library - Fixed
manual_table_cloneincorrectly warning when loop and table are defined at different depths
0.25.0 - 2023-03-12
- Added
CFrame.fromEulerAnglesto the Roblox standard library. - Added
validate-configcommand, which will report any errors in your configuration. - Added
capabilitiescommand, which will report the feature set of the selene installation. This is useful for consumers like the VS Code extension.
- Unknown keys in configuration files are accepted less often now.
- Updated internal parser, supporting Chinese characters better.
- "Legacy" Roblox enums (such as Enum.RaycastFilterType.Whitelist/Blacklist) are now automatically created and marked as deprecated in generated standard libraries.
- Fixed a bug where
manual_table_clonewould incorrectly lint code in loops. (#479)
0.24.0 - 2023-01-10
- Added new
manual_table_clonelint, which will catch manual re-implementations oftable.clonein Luau. - Added
filenamefield to diagnostic message labels in JSON output, indicating for which file the message was generated (#453)
- Improved the error message for using a standard library that can be detected as outdated.
- Updated internal parser, giving support for string interpolation for Luau and fixing some parsing bugs.
- Fixed "library" being typo'd as "libary" in the error when finding a usage.
0.23.1 - 2022-12-06
- Fixed event warnings not being possible to filter out with
roblox_incorrect_roact_usage.
0.23.0 - 2022-12-06
- Added
--display-style=json2, which gives the same outputs as--display-style=json, but with an extratypefield so that it can support more than diagnostics. Extensions should move over to--display-style=json2as more becomes available for it, but take care to check fortype. Currently the only possible value is "Diagnostic". - Added
rawlento the Luau standard library. - Added
Font.fromEnum,Font.fromName, andFont.fromIdto the Roblox standard library. - Added the missing
table.foreachifunction to Lua 5.1 standard library as deprecated.
warnin the Roblox standard library now properly works with all data types instead of only strings.
0.22.0 - 2022-10-15
- Added
--allow-warningsoption to have selene pass when only warnings occur. - Added the ability to allow specific patterns in the
deprecatedlint. - Added exclude option to selene.toml for excluding files from lints
- Adds support for
.yamlextensions to be used for standard libraries alongside.yml. - Normalized "lint" terminology over "rule" throughout codebase. "rules" in
selene.tomlshould now be "lints", but "rules" will still be supported for backwards compatibility.
- Updated internal parser, giving substantial parsing speed increases.
0.21.1 - 2022-09-19
- Fixed not being able to use projects without selene.toml.
0.21.0 - 2022-09-17
undefined_variablenow properly catchesglobalas undefined infunction global.name().- Added the "luau" builtin library.
unused_variableandincorrect_standard_library_usewill now suggest configuring a standard library if one is detected.- Added
constant_table_comparisoncheck to catchx == {}, which will always fail. - Added
high_cyclomatic_complexitycheck to catch overly complex functions that are hard to test, and harder to reason about. This lint is disabled by default. - Added
Font.newto the Roblox standard library. roblox_incorrect_roact_usagenow lints for invalid events.
- Match
.luaufilename extension by default. - Allow
--patternto be passed multiple times. roblox_incorrect_roact_usagenow uses the generated standard library to know what classes and properties exist, meaning a selene update is no longer necessary to update.- Roblox standard libraries are now guaranteed to regenerate when the previously generated standard library is on a different version.
- Fixed
unused_variableincorrectly taggingfunction global.name()whenglobalis defined in the standard library. - Fixed
unscoped_variablesincorrectly taggingfunction global.name()as creating an unscoped variable forglobal. - Fixed
roblox_incorrect_roact_usagealways showing the class name as "Instance". (#297) roblox_incorrect_roact_usagewill now find instances of createElement that do not specify properties.- Fixed issues where
roblox_incorrect_color3_new_boundswould sometimes fail to run.
0.20.0 - 2022-07-21
- Added
utf8globals to the builtinlua53standard library. - Added Roblox datatype constructors
CatalogSearchParams.new,FloatCurveKey.new, andRotationCurveKey.new.
- Errors for generating Roblox API dumps are now more detailed.
- Fixed newer versions of the Roblox API dump failing to create standard libraries for.
- Fixed reporting an error when generating standard libraries panicking.
0.19.1 - 2022-06-22
- Fixed releases coming with Tracy.
0.19.0 - 2022-06-22
table.insert(x)no longer counts as a read tox, which allows selene to alert you that you are only assigning to it.- This is done through a new standard library field for arguments called
observes. This takes 3 values: "read-write" (the default), signifying a potential read and write, "read", signifying only a read, and "write", signifying only a write. Only "write" has meaning at this time.
- This is done through a new standard library field for arguments called
- Added new
must_uselint, which will warn you when you are not using the return value of a function that performs no other behavior.- This is done through a new standard library field for functions called
must_use. Set it totrueto gain this functionality.
- This is done through a new standard library field for functions called
- Fixed a bunch of performance failures, lowering some benchmarks from 3 seconds to 200ms.
0.18.2 - 2022-06-10
- Fixed
Enum.NAME.Valuefailing in newly generated standard libraries.
0.18.1 - 2022-06-07
- Updated internal parser, bringing bug fixes to type information with generic packs.
0.18.0 - 2022-06-07
- Added new YAML based standard library format. The old TOML format is now deprecated and will not have any new functionality added to it, but will be preserved for the forseeable future.
- You can upgrade old TOML standard libraries by running
selene upgrade-std library.toml, which will create a new .yml file of the same name in the new format. - This only affects standard library files.
selene.tomlhas not changed.
- You can upgrade old TOML standard libraries by running
- Added new
deprecatedlint, which can be configured by standard libraries. - Added
debug.resetmemorycategoryto the Roblox standard library. - Added
debug.setmemorycategoryto the Roblox standard library. - Added
--no-summaryoption to suppress summary information.
- Roblox standard library files are now no longer generated in the project directory, and will be updated automatically every 6 hours. You can update it manually with
selene update-roblox-std.- As per the deprecation of TOML standard libraries, you should delete your
roblox.tomlif you have one. - It is possible to pin a standard library in the same way
roblox.tomlwas if you are in an environment where you do not want automatic updates, such as one where you want to limit selene's internet usage. Learn more on the Roblox Guide documentation page.
- As per the deprecation of TOML standard libraries, you should delete your
- With the introduction of the new
deprecatedlint, the--deprecatedfield has been removed fromgenerate-roblox-std, and is now implied.
0.17.0 - 2022-04-10
- Added
start_line,start_column,end_line, andend_columnto JSON diagnostic output. - Added
Color3.fromHexto the Roblox standard library. - Added
table.cloneto the Roblox standard library. - Added
coroutine.closeto the Roblox standard library. - Added
task.cancelto the Roblox standard library.
0.16.0 - 2022-01-30
- Added support for parsing generic type packs, variadic type packs, and explicit type packs in generic arguments for a type under the
robloxfeature flag (type X<S...> = Y<(string, number), ...string, S...>) - Added support for string and boolean singleton types under the
robloxfeature flag (type Element = { ["$$typeof"]: number, errorCaught: true, which: "Query" | "Mutation" | "Subscription" } - Added support for default types in a generic type declaration under the
robloxfeature flag (type Foo<X = string> = X) - Added
table.freeze,table.isfrozen,bit32.countlz,bit32.countrzto the Roblox standard library. - Added
Vector2.zero,Vector2.one,Vector2.xAxis,Vector2.yAxisto the Roblox standard library. - Added
Vector3.zero,Vector3.one,Vector3.xAxis,Vector3.yAxis,Vector3.zAxisto the Roblox standard library. - Added
CFrame.identityto the Roblox standard library. - Added
gcinfoto the Roblox standard library.
- Fixed a bug where empty else blocks were not properly closing their scope, meaning that they could confuse the shadowing lint. (#116)
0.15.0 - 2021-11-05
- Added
OverlapParamsto the Roblox standard library. - Added
Enum:GetEnums()to the Roblox standard library. (#312) roblox_incorrect_color3_new_boundsnow checks for if the given number is negative. (#83)
- Fixed standard library error when missing files. (#272)
- Fixed display style option triggering
ArgumentConflictwhen using quiet option. (#288) bad_string_escapenow correctly handles escapes of the shape\1a(one or two numbers followed by a hex digit). (#292)- Fixed Roblox types not counting towards usage. (#270)
- Fixed incorrect number of paremeters for
bit32.replace
duplicate_keysnow has a error severity. (#262)- Arguments of
collectgarbagenow considered to be optional. (#287) - Updated internal parser, adding new Luau syntax.
0.14.0 - 2021-07-07
- Added
tasklibrary to Roblox standard library.
mismatched_arg_countnow tries to find the best overlap between multiple definitions, rather than ignoring them entirely. This means that if you havef(a)andf(b, c)defined, then callingf(1, 2, 3)will now lint instead of silently passing, since no definition provided meets it.mismatched_arg_countnow shows all function definitions, rather than the local variable assignment. (#259)
- Updated internal parser, fixing some bugs with Roblox parsing. See the changelog here.
0.13.0 - 2021-07-01
- Added
debug.infoto the Roblox standard library. (#260) - Tokenization errors now form rich diagnostics.
- Updated internal parser.
- Optimized linting process to run better with multiple threads.
- Fixed internal selene panics exiting with a zero code. Panics will now exit with status code 1, allowing it to be picked up by CI.
- Fixed variables named
selfnot showing as unused ifallow_unused_selfwas enabled. The implicitselfvariable being unused will still respect this configuration. (#215)
0.12.1 - 2021-05-26
- Fixed compile warning about unused variables.
0.12.0 - 2021-05-26
argis now defined in the Lua 5.1 standard library.- Root level
...will no longer be declared an undefined variable. - Using
...past the first depth will now error withundefined_variable, as it is guaranteed improper code. - You can now combine a function with fields inside standard libraries. This is useful for something like
expect()andexpect.extend(). - Added
mismatched_arg_countlint which will lint against too many arguments passed to calls for locally defined functions. - Added
duplicate_keyslint for checking keys defined more than once inside a table.
- Fixed a bug where some indexes of Roblox structures would fail (such as
workspace.CurrentCamera.ViewportSize.X) - Fixed a bug where chaining
robloxwith another standard library would not read the other standard library ifrobloxwas being generated. - Fixed a bug where
0.5 * xwould always resolve to a number.
- Updated internal parser. This has shown in practice to catch lints that the previous version did not.
0.11.0 - 2021-01-04
- Added support for DateTime in the Roblox standard library.
- Added support for
table.clearin the Roblox standard library.
0.10.1 - 2020-12-22
- Fixed regressions related to numeric for loops.
0.10.0 - 2020-12-21
- Added inline lint filtering, read the documentation for more information.
- More errors now set the exit code.
- Added support for error({any}) to the Roblox standard library.
- Added initial support for Lua 5.3 in the "lua53" standard library:
- New function
string.pack - New function
string.unpack - New function
string.packsize - New optional arg for
math.log
- New function
UDim.newandRegion3int16.newno longer require parameters.UDim2.fromOffsetandUDim2.fromScalenow require you to useUDim.newif no parameters are specified.- Updated full-moon, read the full-moon changelog to learn more.
0.9.2 - 2020-11-06
- Updated full-moon, read the full-moon changelog to learn more.
0.9.1 - 2020-11-04
- Fixed
--display-style=jsongiving an output incompatible with previous tooling.
- Arguments that aren't required can now be filled with nil.
- Added support for
math.roundto the Roblox standard library. - Added support for
CFrame.lookAtto the Roblox standard library.
- setmetatable no longer requires a second argument.
allow_unused_selfis now toggled on forunused_variableby default.- Updated local Roblox reflection for more up to date instances.
- Using a function call as the last argument in a function will silence lint for not passing enough parameters. This means, for example,
math.max(unpack(numbers))will no longer error. - Using an ellipsis on the right side of unbalanced assignments no longer lints.
0.8.0 - 2020-08-24
- Added support for
os.clock. - Added
RaycastParams.new. - Added support for
string.pack,string.packsize, andstring.unpackto the Roblox standard library. - Added lint
compare_nanto guard against comparing directly to nan (e.g.x ~= 0/0). - Add lint
bad_string_escapeto guard invalid or malformed string escape sequences.
- Fixed
coroutine.yieldonly accepting coroutines as a first argument.
0.7.0 - 2020-06-08
- Added support for
continue, compound assignments (+), intersectional types, and numbers with underscores under therobloxfeature flag.
- Fixed several parse errors with numbers.
- Removed types from
debug.tracebackarguments in the Lua 5.1 standard library - Made 4th argument to
CFrame.fromMatrixoptional (#113) - Made standard library aware that functions and
...can return multiple values
0.6.0 - 2020-04-21
- Added timestamp to generated Roblox standard library
- Added
debug.getlocal,math.cosh, andstring.reverse - Added
packagelibrary - Added
Axes,Faces,PathWaypoint, to the Roblox standard library - Added
DebuggerManager,elapsedTimeto the Roblox standard library
- Corrected arguments for
assert,xpcall,coroutine.yield,debug.getinfo,debug.setfenv,string.char, andstring.gsubin Lua 5.1 standard library - Corrected arguments for
bit32.band,Color3.toHSV,Rect.new, andUDim2.newin the Roblox standard library requirenow accepts numbers in the Roblox standard library- Removed
string.dumpfrom the Roblox standard library - Fixed a bug where the
almost_swappedlint would panic if the last line was an assignment (#93)
- Changed the argument display type of
io.inputandio.outputintofile - Updated to version 0.5.0 of full-moon, which should result in speedier parsing
0.5.3 - 2020-01-27
- Added tuple argument to
xpcall - Added
CFrame.fromEulerAnglesYXZto Roblox standard library - Added
ColorSequenceKeypointto the Roblox standard library
- Fixed comments with tabs reporting as a parse error.
0.5.2 - 2020-01-19
- Fixed debug output for the standard library.
0.5.1 - 2020-01-19
- Added the
utf8library to the Roblox standard library - Added support for Typed Lua when using the Roblox feature flag.
- Updated full-moon, which should result in faster parsing.
0.5.0 - 2019-12-20
- Added
type_check_inside_calllint for checkingtype(foo == "type")instead oftype(foo) == "type". - Added
NumberRangeto the Roblox standard library. - Added
string.splitto the Roblox standard library. - Added
table.findto the Roblox standard library. - Added
table.createto the Roblox standard library. - Added
table.moveto the Roblox standard library. - Added
table.packto the Roblox standard library. - Added
table.unpackto the Roblox standard library. - Added
coroutine.yieldableto the Roblox standard library. - Added second argument to
math.logto the Roblox standard library. - Added
NumberSequenceKeypointto the Roblox standard library.
- Fixed ternary expressions resolving as booleans.
0.4.3 - 2019-11-20
- Added
display-styleflag to use either rich (default), quiet (equivalent to -q), or JSON.
- Fixed a concatenated result always triggering an error when the standard library function expected a constant string (such as
collectgarbageorInstance.new). - Fixed parenthese conditions mixed with non-parenthese conditions (such as
(condition) and condition) tripping theparenthese_conditionslint.
0.4.2 - 2019-11-13
- Fixed Roblox standard library not including structs, and thus failing when using
game,script, etc.
0.4.1 - 2019-11-13
- Fixed Roblox standard library not including Lua 5.1 globals the first time you ran selene.
0.4.0 - 2019-11-13
- A Roblox standard library can now be generated by simply having
std = "roblox"in your configuration and running selene. If it does not exist, it will create one. This can also be initiated manually withselene generate-roblox-std. - Added
roblox_incorrect_color3_new_bounds. - Added support for binary literals when using the
robloxfeature flag.
- Changed incorrect_roact_usage to roblox_incorrect_roact_usage. (#41)
- Changed parsing errors to produce prettier results.
0.3.0 - 2019-11-08
- Added
--coloroption to specify whether colors could be used on the output. - Added
incorrect_roact_usagelint to verify correct usage of Roact.createElement. - Added
unscoped_variableslint to disallow usage of unscoped (global) variables.
- Colors will no longer be on by default when being piped. (#32)
- Fixed false positive with
unused_variablelinting function declarations as only mutations. (#30) - Fixed terminal colors not resetting properly. (#33)
0.2.0 - 2019-11-06
- Added standard library chaining. This means you can combine two standard libraries by setting
stdin selene.toml tostd1+std2. You can chain as many as you want.
0.1.0 - 2019-11-06
- Initial release