Ukendio / jecs

A fast, portable Entity Component System for Luau
https://ukendio.github.io/jecs/
MIT License
150 stars 26 forks source link

[BUG] Inconsistent Formatting #138

Closed christopher-buss closed 1 month ago

christopher-buss commented 1 month ago

Describe the bug

StyLua is installed on this repository, but does not seem to have been run.

Reproduction

Run StyLua. Formatting changes.

local EcsOnAdd              = HI_COMPONENT_ID + 1
local EcsOnRemove           = HI_COMPONENT_ID + 2
local EcsOnSet              = HI_COMPONENT_ID + 3
local EcsWildcard           = HI_COMPONENT_ID + 4
local EcsChildOf            = HI_COMPONENT_ID + 5
local EcsComponent          = HI_COMPONENT_ID + 6
local EcsOnDelete           = HI_COMPONENT_ID + 7
local EcsOnDeleteTarget     = HI_COMPONENT_ID + 8
local EcsDelete             = HI_COMPONENT_ID + 9
local EcsRemove             = HI_COMPONENT_ID + 10
local EcsName               = HI_COMPONENT_ID + 11
local EcsRest               = HI_COMPONENT_ID + 12

local ECS_PAIR_FLAG         = 0x8
local ECS_ID_FLAGS_MASK     = 0x10
local ECS_ENTITY_MASK       = bit32.lshift(1, 24)
local ECS_GENERATION_MASK   = bit32.lshift(1, 16)

local ECS_ID_DELETE         = 0b0000_0001
local ECS_ID_IS_TAG         = 0b0000_0010
local ECS_ID_HAS_ON_ADD     = 0b0000_0100
local ECS_ID_HAS_ON_SET     = 0b0000_1000
local ECS_ID_HAS_ON_REMOVE  = 0b0001_0000
local ECS_ID_MASK           = 0b0000_0000

The above definitely fails StyLua.

Expected Behavior

Nothing because it should already be formatted.

Actual Behavior

Formatting occurs.

Fireboltofdeath commented 1 month ago

I'm encounter this too. Please fix.