Skip to content

Commit

Permalink
Fix UDim2.new() linting
Browse files Browse the repository at this point in the history
  • Loading branch information
Kampfkarren committed Nov 11, 2023
1 parent bf305f8 commit 4372b41
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 1 deletion.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [Unreleased](https://github.com/Kampfkarren/selene/compare/0.26.0...HEAD)
### Fixed
- Fixed `UDim2.new()` firing the [`roblox_suspicious_udim2_new` lint](https://kampfkarren.github.io/selene/lints/roblox_suspicious_udim2_new.html).

## [0.26.0](https://github.com/Kampfkarren/selene/releases/tag/0.26.0) - 2023-11-11
### Added
Expand Down
2 changes: 1 addition & 1 deletion selene-lib/src/lints/roblox_suspicious_udim2_new.rs
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ impl Visitor for UDim2CountVisitor {
then {
let args_provided = arguments.len();

if args_provided >= 4 {
if args_provided == 0 || args_provided >= 4 {
return;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,4 @@ UDim2.new(1, 1, 1, 1)
UDim2.new(a, b, c, d)
UDim2.fromOffset(1, 1)
UDim2.fromScale(1, 1)
UDim2.new()

0 comments on commit 4372b41

Please sign in to comment.