Skip to content

Conversation

@WalterWoshid
Copy link

We have a monorepo and constantly work with our main project and another core project that is included in other projects as well. Mago has no problems analyzing paths like ../core/blablabla, but the IDE plugin struggles with that. It still shows inspections that are actually excluded by the baseline file. This fixes it.

@xepozz
Copy link
Contributor

xepozz commented Jan 25, 2026

Hi @WalterWoshid
I need more details how to reproduce it.

Mago has no problems analyzing paths like ../core/blablabla

Where do you see this path?

It still shows inspections that are actually excluded by the baseline file

Hmm, also need example

@WalterWoshid
Copy link
Author

WalterWoshid commented Jan 25, 2026

Hi @xepozz, I hope this clarifies things.

We have a main project and a core project. The core project is used in other projects as well. Mostly we have this workflow: open the main project and then attach the core project in the IDE. We are trying to include Mago and have 2 configuration files, one for main and one for core. I created a mago.local.toml which is used as the config. I generated a baseline and this one includes issues for main (file = "test.php") and core (file = "../core/test.php"). When I run the mago --config=mago.local.toml analyze command, it shows "Filtered out X issues based on the baseline file. No issues found". With the IDE plugin the files in the main project are not analyzed, because they are incldued in the baseline. However, files in the core project are analyzed, even though they should not be, because they are also in the baseline.

In the picture you can see:

  • Top left file (main project) -> No Mago inspections
  • Top right file (core project) -> Mago inspections
  • Bottom left file -> Local config that is used by the plugin
  • Bottom right file -> baseline which includes paths not in the workspace
  • At the bottom, listing all files found by mago and also no issues when running the analyze command.
image

With my fix, it successfully ignores entries from the baseline on both "main" and "core". (New errors at the bottom as an example)

image

I added a folder monorepo for you to reproduce https://github.com/WalterWoshid/mago-plugin/tree/fixes-example (and yes, I just noticed that was maybe the wrong name for the folder lol)

@xepozz
Copy link
Contributor

xepozz commented Jan 25, 2026

Thanks for the explanation.

I think I managed to reproduce it.

First of all, you should specify the mago path in the project settings. I used Local path which allows to use binary
image

I did some dumps inside the annotator and got the following:

project base: /Users/xepozz/IdeaProjects/j-plugins/mago-plugin/playground/monorepo/package-a
analyze options: --workspace=/Users/xepozz/IdeaProjects/j-plugins/mago-plugin/playground/monorepo/package-a analyze ./../core/test.php --reporting-format=json

And finally I have these errors:
image

Is everything as you planned?

@WalterWoshid
Copy link
Author

@xepozz That's perfect, thank you 🚀

@xepozz
Copy link
Contributor

xepozz commented Jan 26, 2026

Ok let's try it

@xepozz xepozz merged commit a34d77e into j-plugins:main Jan 26, 2026
@xepozz
Copy link
Contributor

xepozz commented Jan 26, 2026

Tagged 2026.1.4 version. It will be available in a few minutes on the marketplace

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

Successfully merging this pull request may close these issues.

2 participants