Sitelet https://web.archive.org/web/20260605101621/https://github.com/github/codeql/issues/7006
Skip to content

CodeQL Language Feature: Trailing comma at end of List #7006

@JLLeitschuh

Description

@JLLeitschuh

This is a quality of life/syntactic sugar feature request:

It would be awesome if CodeQL, similar to Python, Java and C supported creating lists where the last element can have a trailing comma. For example:

fruit = [
  "apple",
  "kiwi",
  "grape",
]

Rationale is basically the same as in other languages: The main advantages are that it makes multi-line lists easier to edit and that it reduces clutter in diffs.
This is especially helpful when writing SummaryModelCsv by hand and you need to copy/paste then modify a previously written line, then run unit tests. It gets annoying have to constantly remove, then add a new , at the end of the last line you add.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions