Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Action ran fine, but didn't pick TSX comments? #160

Open
netpoe opened this issue Jun 26, 2023 · 5 comments
Open

Action ran fine, but didn't pick TSX comments? #160

netpoe opened this issue Jun 26, 2023 · 5 comments

Comments

@netpoe
Copy link

netpoe commented Jun 26, 2023

So, .tsx extension is listed in the languages.yml file, this is my TODO comment:

{/*
  @TODO complete the FAQs
  labels: 100 USDT
*/}

I already added the IDENTIFIERS prop the workflow file:

name: "Run TODO to Issue"
on: ["push"]
jobs:
    build:
        runs-on: "ubuntu-latest"
        steps:
            - uses: "actions/checkout@v3"
            - name: "TODO to Issue"
              uses: "alstr/todo-to-issue-action@v4"
              with:
                IDENTIFIERS: '[{"name": "@TODO", "labels": ["help wanted"]}]'

Didn't pick the @TODO comment after pushing the file, but the action ran without errors.

Does the comment is formatted incorrectly?

@alstr
Copy link
Owner

alstr commented Jun 26, 2023

Hey, thanks for the feedback.

I haven't much experience with TSX myself, and we're missing a test for this extension, but my initial impression is that the opening { and closing } may be confusing things, as in syntax.json a comment is defined as \* ... *\ and it has to appear at the start of a line; at the moment that's not the case. Is that something you can test?

@Superalexandre
Copy link

Hey, I have some issue with TSX comment too,

A comment is { /* ..... */ } i can provide some test if needed

@alstr
Copy link
Owner

alstr commented Dec 15, 2023

Looks like we need to update syntax.json as at the moment I don't think it's looking for that. I'll try and look next time I get chance.

@Superalexandre
Copy link

Superalexandre commented Dec 17, 2023

To be more specific a comment can be
// /* */ {/* */} { /* */ }

@Christoph-Koschel
Copy link
Contributor

This could be a hard issue, though, because we cannot just say that we allow any character before a TODO comment since when the programmer writes "//TODO" into a string, then the string would also match in an unexpected behavior. I also thought about a better solution because sometimes you write a comment behind code what is also currently not matched:

// TODO This is being matched
function foo(): string {
    let bar: string = "// TODO A TODO in a string";
    return bar; // TODO This don't match but should match
}

I try to make something up, but I'm open to ideas.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants