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

Webpack warnings cannot be matched #9599

Closed
cjam opened this issue Jul 21, 2016 · 1 comment
Closed

Webpack warnings cannot be matched #9599

cjam opened this issue Jul 21, 2016 · 1 comment
Assignees
Labels
*duplicate Issue identified as a duplicate of another issue(s) *question Issue represents a question, should be posted to StackOverflow (VS Code) tasks Task system issues

Comments

@cjam
Copy link

cjam commented Jul 21, 2016

  • VSCode Version: 1.3.1
  • OS Version: OS X 10.11.5

I am using webpack to build and pack up my application. Webpack produces warnings in the following format when you accidentally use an import with the wrong case in the file path: (i.e. ./Components/SomeComponent vs ./components/SomeComponent)

WARNING in ./src/Components/SomeComponent.tsx
There is another module with an equal name when case is ignored.
This can lead to unexpected behavior when compiling on a filesystem with other case-semantic.
Rename module if multiple modules are expected or use equal casing if one module is expected.

Now when I try to use the following problem matcher for this:

                {
                    "owner": "webpack",
                    "fileLocation": "relative",
                    "severity": "warning",
                    "pattern": [                        
                        {
                            "regexp": "WARNING in (.*)",
                            "file": 1
                        }
                        ,{
                            "regexp": "(.*)$",
                            "message": 1,
                            "loop": true
                        }
                    ]                   
                }

I get the following message when trying to build the project:

The problem pattern is invalid. It must have at least a file, message and line or location match group.

So it seems that the problem matcher validation logic requires that there is a location (line,col) for a rule to be valid. Couldn't the default just being the first line / column of a file so that the matcher could handle scenarios like this where its a file in general that produces the warning?

I admit, I feel like Webpack's warning should include a line/col as it is complaining about a specific import. But it would also be nice to be able to handle plugins that aren't necessarily being good citizens with respects to the output they surface.

@kieferrm kieferrm added the *question Issue represents a question, should be posted to StackOverflow (VS Code) label Jul 22, 2016
@dbaeumer dbaeumer added *duplicate Issue identified as a duplicate of another issue(s) tasks Task system issues labels Aug 4, 2016
@dbaeumer
Copy link
Member

dbaeumer commented Aug 4, 2016

Dups #6538

@dbaeumer dbaeumer closed this as completed Aug 4, 2016
@vscodebot vscodebot bot locked and limited conversation to collaborators Nov 18, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
*duplicate Issue identified as a duplicate of another issue(s) *question Issue represents a question, should be posted to StackOverflow (VS Code) tasks Task system issues
Projects
None yet
Development

No branches or pull requests

3 participants