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

Possible false-positive caused by rounding/float ? #78

Open
fmigneault opened this issue Apr 18, 2024 · 1 comment
Open

Possible false-positive caused by rounding/float ? #78

fmigneault opened this issue Apr 18, 2024 · 1 comment
Labels
wontfix This will not be worked on

Comments

@fmigneault
Copy link

Running stac-node-validator, I get the following error, which seems to be causing a diff only on the last digit 5 -> 3.
Is this really only a floating point issue, or am I missing something else?

https://github.com/crim-ca/dlm-extension/actions/runs/8732451702/job/23959462411?pr=2

 -- Validation error in core, skipping extension validation
-- Lint: File is malformed -> use `--format` to fix the issue
            -7.882190080512502,
            58.21798141355221
          ],
          [
-           27.911651652899925,
+           27.911651652899923,
            58.21798141355221
          ],
          [
-           27.911651652899925,
+           27.911651652899923,
            37.13739173208318
          ],
          [
            -7.882190080512502,
            37.13739173208318
          ]
        ]
      ]
    },
@m-mohr
Copy link
Collaborator

m-mohr commented Jul 11, 2024

The linter/formatter is very basic and only works well in the context of the JavaScript ecosystem. It checks against what the JS writer outputs and other implementations slightly differ, especially with regards to numbers as you've also identified. So it's not an issue on your side, but it's also unlikely to be fixed. If you run into such issues I'd recommend to disable linting and use a linter that works for your ecosystem.

@m-mohr m-mohr added the wontfix This will not be worked on label Jul 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
wontfix This will not be worked on
Projects
None yet
Development

No branches or pull requests

2 participants