Schematic Off-Grid ERC is not reproducible because it depends on the editor's current grid selection
Description
KiCad 7 adds a check to see if schematic elements are on the grid.
This is good, but the problem is: what is supposed to be the correct grid?
Currently this is the selected grid, which is a non-sense. If I temporally select a bigger grid and run the ERC I'll get tons of ERC errors. If I send the file to other person, which uses a bigger grid, s/he will get tons of errors.
The point is simple: the schematic should have an option to indicate which is the grid we want for the checks. And this should be stored in the project or in the schematic itself (I don't know which is better).
Using the currently selected value isn't good.
This is generating problems to people using CI/CD. If they used a grid smaller than the default they get ERC errors. I can workaround it in KiBot, by adding an option to select the grid that the KiCad inside the docker container will use, but I think this should be fixed in KiCad.
KiCad Version
Application: KiCad Schematic Editor
Version: (7.0.0-146-ge05df63688-dirty)-fork+24a63eb304+deb11, release build
Libraries:
wxWidgets 3.0.5
FreeType 2.10.4
HarfBuzz 2.7.4
FontConfig 2.13.1
Platform: Debian GNU/Linux 11 (bullseye), 64 bit, Little endian, wxGTK, gnome-xorg, x11
wxWidgets: 3.0.5 (wchar_t,wx containers,compatible with 2.8) GTK+ 3.24
Boost: 1.74.0
OCC: 7.5.1
Curl: 7.74.0
ngspice: 34
Compiler: GCC 10.2.1 with C++ ABI 1014
Build settings:
KICAD_SPICE=ON