Skip to content

v0.109.0

Choose a tag to compare

@github-actions github-actions released this 14 Sep 17:43
· 452 commits to main since this release

Added

  • Seven checks catch declaration errors and deprecated platform calls before deployment. They
    report missing initializers, defaults on required fields, escaping scoped resources, repeated
    declarations, case values and catch types, and calls bound only to deprecated platform overloads.
    (#98)

  • An optional unused-constant check finds declarations the project never reads. Enable
    code/unused-constant explicitly when cleaning up a project.
    (#98)

  • Five rules report assignments and jumps that roll the build back. code/self-assignment and
    code/assign-target catch X = X and a left side such as Obj?.Value, code/assign-readonly a new
    value for a val, use, loop or catch variable, code/unreachable-statement code after return,
    and code/misplaced-jump a break outside a loop. (#89) (#90) (#91)

  • style/boolean-ternary and style/redundant-scope report what the platform IDE warns about. A
    ternary with True and False branches is its own condition, and a scope that is the only
    statement of its block limits nothing. Both come with a fix. (#86)

  • style/redundant-union-member and code/duplicate-import report repeats the IDE warns about. A
    union member another one covers and a namespace imported twice are removed by the fix;
    yaml/duplicate-import does the same for the Import section of an element. (#87)

  • code/lambda-changes-outer-local reports a lambda that assigns a local declared outside it.
    The platform does not compile such code, and the linter let it through. Changing a member or an
    element of the captured value stays allowed. (#84)

  • code/redundant-cast and code/cast-to-non-null report the casts the platform IDE warns
    about.
    A cast to the type a value already has, or one that only drops Undefined, passed the
    linter, and one project had 65 of them. The fix removes the cast or puts ! in its place.
    (#74)

  • code/redundant-undefined-guard reports ??, ! or ?. over a value that is never
    Undefined.
    The platform IDE warns about such a guard, but the engine typed neither a
    component by its markup nor a generic member by its argument. The fix removes ?? ... and !.
    (#73)

  • code/redundant-type-check reports an is check whose result is known in advance. Such a
    check always passes, or never does for is not, and the platform IDE warns about it. A query
    column gets its type from the selected field. (#73)

  • style/constructor-literal reports a constructor call that a literal of the type replaces.
    The platform IDE warns about new Date("9999-12-31") and FindType("Std::String"), and the
    linter let such calls through. The fix writes Date{9999-12-31} where the literal holds the same
    value. (#71)

  • resource-references finds the places that name a resource file or folder. It reads the
    sources the way move-resource does. Every place comes with its file, range and line, and string
    lookups and a key that two folders hold are marked. MCP calls it meta_resource_references, LSP
    xbsl/metaResourceReferences. (#67)

  • move-resource, rename-resource-folder and delete-resource-folder work with resource
    folders.
    A file moved by hand left its Resource{...} keys on the old path until a build
    failed. The commands move the files and rewrite the keys; lookups by a computed string are listed,
    not edited. (#62)

Changed

  • Discarded expressions are reported as build errors even when they contain calls.
    code/statement-no-effect now accepts only method calls and throws as expression statements.
    Read-only assignments also cover fields reached through a local structure receiver.
    (#98)

  • Version diagnostics identify the imported engine location. --version, --where, MCP
    environment information and the LSP startup log distinguish installed copies and source checkouts
    that share a version number. (#98)

  • comment/emphasis-caps reads more than its list of function words. It now catches a capital
    letter inside a sentence, a negation glued on, an ordinary word in capitals and the English line of a
    comment, and tells an abbreviation by the file itself. The comment walk no longer takes an HTML value
    with \' in a yaml for a comment. (#92)

  • comment/first-person reads the English line of a translated comment. A phrases value such as
    "we build it from the name" passed while its Russian key was reported. Literals, often a text for
    the user, are not judged. (#85)

  • The guard, is check and cast rules read one type inference. The first two kept their own copy
    of type sets and of the query-column reader, and each copy knew shapes the other did not. Now the
    type check also reads computed query columns and entity contracts, the guard an element of a typed
    array, and a cast the value of a component in the paired markup. (#93)

  • xbsl/formKeys also answers the values of enumerated properties. The new values field pairs
    English and Russian values per property, and the answer names command classes and the members of
    inline fonts and colors. A client that reads an English form no longer has to guess. (#83)

  • xbsl.typeinfer answers with a set of types and knows the project's own names. It used to
    name a single type from the platform catalog, so a query column, a union parameter or a structure
    from another module stayed unknown. (#74)

  • code/unused-local reports an unused use variable and a local that is only assigned. The
    platform IDE warns about both, while the rule skipped use and took a write for a read. The fix
    drops the name of an unused use, and the resource still closes at the end of the scope.
    (#69)

  • With --project-root, the LSP server skips yaml outside the root, except the dictionary. Such
    a file got findings when opened and lost them at the next save. Modules are still checked wherever
    they are opened. (#59)

  • delete-object and delete-resource-folder remove the folders their deletions empty. A
    package whose last object was deleted used to stay behind as an empty folder, which git does not
    keep anyway. (#62)

Fixed

  • Current property types retain their nullable alternatives. The extractor separates historical
    member forms from current ones and resolves inherited members in order, so an older signature no
    longer erases the empty value from a current property type.
    (#98)

  • code/ternary-and-or no longer calls every A and B ? X : Y a compile error. That ternary takes the whole
    condition and compiles; only a ternary right after is Type belongs to the check and breaks the line. The rule now
    reports that form alone, and the fix puts the condition in parentheses. (#97)

  • The parser reads not Value is String as (not Value) is String, as the platform does. It used to put the
    whole check under not, so a redundant cast or a known-in-advance check of a negation went unreported.
    (#97)

  • A platform type keeps its spelling where only a type can stand. A field, attribute or method
    named like a platform type held that type in type expressions and before a facet, so the English
    tree mixed spellings. A type expression, a static call root and a facet owner now take the
    platform's spelling unless the project declares a type of that name. (#94)

  • A resource file and a method of the project's own component are spelled alike everywhere. The
    file could take a platform word while a form kept its own name, and a call through a form node took a
    built-in command. Both now follow the project dictionary; pictures of the platform library read as
    before. (#95)

  • A local that hides a platform type of the same English word is a collision. With such a parameter
    the English tree read the parameter where the method meant the type, and --strict passed while the
    build failed. The report now names both places. (#96)

  • The import rules read more tables. A joined table of the reference input settings and a table
    after a join condition (FROM A LEFT JOIN B ON ..., C) went unread, and code/unused-import could
    call such an import unused. The project module now needs import Subsystem for an element of a
    subsystem root as well. (#88)

  • The visibility rules read the tables of lists and queries. A non-public table of another
    subsystem in a dynamic list, input settings, a Query{...} block or the query of a virtual table
    breaks the build, and yaml/foreign-not-public and code/foreign-not-public now report it. (#88)

  • yaml/wrong-namespace and code/wrong-namespace judge a partial name of an element kept in
    several places.
    The compiler looks only where the name leads, so the finding lists the places and
    leaves the choice to the author. (#88)

  • A translation dictionary no longer hides dead methods. It names every method it translates,
    and code/unused-method took those names for uses, so a check of the project together with its
    dictionary found nothing. (#82)

  • The "never used" rules count the words of a file that does not parse.
    code/client-available-unused and yaml/unused-component dropped such a file whole, so a method
    or a component used only there was reported. (#79)

  • --set and translate_set write a key in every place the dictionary declares it. A repeated
    key got the new value on one line only, so the next load refused the dictionary, and a removal left
    the copy translating. A key named twice in one batch no longer takes the neighbouring entry along.
    (#81)

  • An English SOAP service client keeps its kind without the kind table in the data. The fallback
    spellings, used with no data or with data extracted before 0.54.1, lacked SoapServiceClient, so
    the project overview counted such a client apart and a filter by kind missed it. (#80)

  • The LSP server keeps the findings of a module opened outside the project root. The
    whole-project check runs on every save and used to clear the findings of every open file it had
    not read. Now they stay until the file is closed. (#78)

  • translate keeps the spelling of a name's declaration. A local, a parameter, a lambda
    parameter, a catch variable or a property of the module's own element named like a platform
    type took the type's spelling in Name.Member and inside %{...}. The English build then met a
    variable nothing reads and a member the type lacks. (#76)

  • A short lambda may assign in its body. The platform compiles
    List.ForEach(Item -> Item.Value = 1), but the parser reported syntax errors there, as it did
    for a lone parameter named Type, Query or Method. Rules that need the parse skipped such a
    module, and code/client-available-unused reported a method called only from it.
    (#75)

  • style/shadow-own-property finds a variable named like an inherited property. The rule read
    only the element's own yaml and missed the properties a component inherits from its platform
    type, which were all seven IDE warnings on one project. As in the IDE, static methods and loop
    variables are no longer reported. (#72)

  • code/unused-import repeats the type lookups the compiler makes. The rule took any word that
    spelled an element for a use, the import line itself included, and on a project with packages it
    missed every import the platform IDE reports. On every project checked the findings now match the
    IDE, and the fix removes the line. (#70)

  • code/unused-local and code/unused-loop-var no longer report a variable read below a batch
    query or the counter of for X = A to B.
    A ; inside the query ended the method early, and the
    IDE does not track the counter of a numeric loop. (#69)

  • yaml/missing-import reads the tables of a dynamic list. A list whose main or joined table
    lay in a package of another subsystem passed the linter, and the server build refused it. Such a
    table now asks for the import like any other reference.
    (#58)

  • yaml/wrong-namespace and code/wrong-namespace check the partial name too.
    Subsystem::Name goes stale after a move into a package just like the full name, and the build
    refuses it. The fix writes the package segment when the element lies in one place.
    (#58)

  • code/package-resources-missing checks the root of a subsystem as well. A run on a server
    showed that without its own Resources folder ResourcesPackage.Current() finds nothing there,
    not even the files of the packages. (#58)

  • The dictionary load and --check-duplicates see a key repeated in one file. The yaml parser
    keeps only the last value, so such a pair loaded with its second translation unnoticed. The repeat
    now counts as a conflict or a duplicate, named by file and line.
    (#57)

  • The LSP server keeps the dictionary findings next to a narrowed project root. The project-wide
    check read only the files under --project-root and cleared the findings of other open files, so
    a dictionary file lost them at the first save. The check now covers the dictionary.
    (#59)

  • move-object, rename-object and delete-object no longer lose the WSDL descriptions of a
    SOAP service client.
    The <Name>.Wsdl.1.wsdl file stayed behind, so a moved or renamed client
    failed to apply. A rename keeps the number of each description and updates a reference from one
    description to another by file name. (#63)

What's Changed

  • Расширены проверки языка, исправлены каталог типов и корень проекта by @keyfire in #98

Full Changelog: v0.108.0...v0.109.0