π Rule Proposal
π§βπ» User Story
As a TI developer, I want linti to flag direct reads of control cubes that are only implicitly created by other functions, so that my process doesn't crash when that control cube doesn't exist yet.
π Description
Certain TM1 functions implicitly create control cubes the first time they run, e.g. CubeSetLogChanges or CubeGetLogChanges creates }CubeProperties.
# Bad
CellGetS('}CubeProperties', pCube, 'LOGGING' );
# Good
CubeGetLogChanges( pCube )
# Bad
CellPutS(pCubeLogging, '}CubeProperties', pCube, 'LOGGING' );
# Good
CubeSetLogChanges( pCube, pCubeLogging);
AttrInsert/ElementAttrInsert create }ElementAttributes_<Dimension>, and ElementSecurityPut creates }ElementSecurity_<Dimension>. A direct read of one of these cubes (e.g. via CellGetN/CellGetS) without a preceding CubeExists check aborts the process if the cube was never created.
β
Acceptance Criteria
Notes
π Rule Proposal
π§βπ» User Story
As a TI developer, I want linti to flag direct reads of control cubes that are only implicitly created by other functions, so that my process doesn't crash when that control cube doesn't exist yet.
π Description
Certain TM1 functions implicitly create control cubes the first time they run, e.g.
CubeSetLogChangesorCubeGetLogChangescreates}CubeProperties.AttrInsert/ElementAttrInsertcreate}ElementAttributes_<Dimension>, andElementSecurityPutcreates}ElementSecurity_<Dimension>. A direct read of one of these cubes (e.g. viaCellGetN/CellGetS) without a precedingCubeExistscheck aborts the process if the cube was never created.β Acceptance Criteria
CubeExistscheck for that cube precedes it in the same block'}ElementAttributes_' | vDim), to the extent the architecture allowsNotes