Single draw plugin - #422
Quality Gate passed
Annotations
Check warning on line 62 in plugins/draw/src/adapters/maplibre/modes/editVertexMode/touchHandlers.js
sonarqubecloud / SonarCloud Code Analysis
Use null instead.
See more on https://sonarcloud.io/project/issues?id=DEFRA_interactive-map&issues=AZ_Rp29dKxw6I5xrx9ej&open=AZ_Rp29dKxw6I5xrx9ej&pullRequest=422
Check warning on line 165 in plugins/draw/src/adapters/openlayers/edit/EditMode.test.js
sonarqubecloud / SonarCloud Code Analysis
Prefer "expect(manager.undoStack).toHaveLength(0)" over this generic assertion for better reporting; it works on any object with a numeric length property.
See more on https://sonarcloud.io/project/issues?id=DEFRA_interactive-map&issues=AZ_Rp26OKxw6I5xrx9eV&open=AZ_Rp26OKxw6I5xrx9eV&pullRequest=422
sonarqubecloud / SonarCloud Code Analysis
Prefer "expect(map._undoStack).toHaveLength(0)" over this generic assertion for better reporting; it works on any object with a numeric length property.
See more on https://sonarcloud.io/project/issues?id=DEFRA_interactive-map&issues=AZ_Rp29pKxw6I5xrx9ek&open=AZ_Rp29pKxw6I5xrx9ek&pullRequest=422
Check warning on line 25 in plugins/draw/src/utils/undoStack.test.js
sonarqubecloud / SonarCloud Code Analysis
Prefer "expect(stack).toHaveLength(0)" over this generic assertion for better reporting; it works on any object with a numeric length property.
See more on https://sonarcloud.io/project/issues?id=DEFRA_interactive-map&issues=AZ_Rp2_cKxw6I5xrx9e2&open=AZ_Rp2_cKxw6I5xrx9e2&pullRequest=422
sonarqubecloud / SonarCloud Code Analysis
Prefer "expect(h.map._undoStack).toHaveLength(0)" over this generic assertion for better reporting; it works on any object with a numeric length property.
See more on https://sonarcloud.io/project/issues?id=DEFRA_interactive-map&issues=AZ_Rp2-BKxw6I5xrx9en&open=AZ_Rp2-BKxw6I5xrx9en&pullRequest=422
sonarqubecloud / SonarCloud Code Analysis
Prefer "expect(map._undoStack).toHaveLength(0)" over this generic assertion for better reporting; it works on any object with a numeric length property.
See more on https://sonarcloud.io/project/issues?id=DEFRA_interactive-map&issues=AZ_Rp29OKxw6I5xrx9ei&open=AZ_Rp29OKxw6I5xrx9ei&pullRequest=422
Check warning on line 28 in plugins/draw/src/adapters/maplibre/modes/editVertexMode.test.js
sonarqubecloud / SonarCloud Code Analysis
Prefer "expect(map._undoStack).toHaveLength(1)" over this generic assertion for better reporting; it works on any object with a numeric length property.
See more on https://sonarcloud.io/project/issues?id=DEFRA_interactive-map&issues=AZ_Rp2-PKxw6I5xrx9eo&open=AZ_Rp2-PKxw6I5xrx9eo&pullRequest=422
Check warning on line 242 in plugins/draw/src/adapters/openlayers/edit/EditMode.test.js
sonarqubecloud / SonarCloud Code Analysis
Prefer "expect(manager.undoStack).toHaveLength(0)" over this generic assertion for better reporting; it works on any object with a numeric length property.
See more on https://sonarcloud.io/project/issues?id=DEFRA_interactive-map&issues=AZ_Rp26OKxw6I5xrx9eZ&open=AZ_Rp26OKxw6I5xrx9eZ&pullRequest=422
Check warning on line 11 in plugins/draw/src/utils/undoStack.test.js
sonarqubecloud / SonarCloud Code Analysis
Prefer "expect(stack).toHaveLength(2)" over this generic assertion for better reporting; it works on any object with a numeric length property.
See more on https://sonarcloud.io/project/issues?id=DEFRA_interactive-map&issues=AZ_Rp2_cKxw6I5xrx9e1&open=AZ_Rp2_cKxw6I5xrx9e1&pullRequest=422
Check warning on line 131 in plugins/draw/src/adapters/openlayers/edit/EditMode.test.js
sonarqubecloud / SonarCloud Code Analysis
Prefer "expect(manager.undoStack).toHaveLength(1)" over this generic assertion for better reporting; it works on any object with a numeric length property.
See more on https://sonarcloud.io/project/issues?id=DEFRA_interactive-map&issues=AZ_Rp26OKxw6I5xrx9eU&open=AZ_Rp26OKxw6I5xrx9eU&pullRequest=422
Check warning on line 137 in plugins/draw/src/adapters/maplibre/modes/drawMode/undoHandlers.test.js
sonarqubecloud / SonarCloud Code Analysis
Prefer "expect(ctx.map._undoStack).toHaveLength(0)" over this generic assertion for better reporting; it works on any object with a numeric length property.
See more on https://sonarcloud.io/project/issues?id=DEFRA_interactive-map&issues=AZ_Rp2-ZKxw6I5xrx9ep&open=AZ_Rp2-ZKxw6I5xrx9ep&pullRequest=422
sonarqubecloud / SonarCloud Code Analysis
Prefer "expect(map._undoStack).toHaveLength(0)" over this generic assertion for better reporting; it works on any object with a numeric length property.
See more on https://sonarcloud.io/project/issues?id=DEFRA_interactive-map&issues=AZ_Rp2-BKxw6I5xrx9em&open=AZ_Rp2-BKxw6I5xrx9em&pullRequest=422
Check warning on line 132 in plugins/draw/src/adapters/maplibre/modes/drawMode/clickHandlers.test.js
sonarqubecloud / SonarCloud Code Analysis
Prefer "expect(ctx.map._undoStack).toHaveLength(1)" over this generic assertion for better reporting; it works on any object with a numeric length property.
See more on https://sonarcloud.io/project/issues?id=DEFRA_interactive-map&issues=AZ_Rp2-6Kxw6I5xrx9ex&open=AZ_Rp2-6Kxw6I5xrx9ex&pullRequest=422
Check warning on line 102 in plugins/draw/src/DrawInit.test.jsx
sonarqubecloud / SonarCloud Code Analysis
Remove this redundant `act()` call; the wrapped call already flushes its own updates.
See more on https://sonarcloud.io/project/issues?id=DEFRA_interactive-map&issues=AZ_Rp2_sKxw6I5xrx9e5&open=AZ_Rp2_sKxw6I5xrx9e5&pullRequest=422
Check warning on line 34 in plugins/draw/src/DrawInit.test.jsx
sonarqubecloud / SonarCloud Code Analysis
Remove this redundant `act()` call; the wrapped call already flushes its own updates.
See more on https://sonarcloud.io/project/issues?id=DEFRA_interactive-map&issues=AZ_Rp2_sKxw6I5xrx9e4&open=AZ_Rp2_sKxw6I5xrx9e4&pullRequest=422
sonarqubecloud / SonarCloud Code Analysis
Prefer "expect(ctx.map._undoStack).toHaveLength(0)" over this generic assertion for better reporting; it works on any object with a numeric length property.
See more on https://sonarcloud.io/project/issues?id=DEFRA_interactive-map&issues=AZ_Rp29OKxw6I5xrx9eh&open=AZ_Rp29OKxw6I5xrx9eh&pullRequest=422
Check warning on line 171 in plugins/draw/src/adapters/openlayers/edit/EditMode.test.js
sonarqubecloud / SonarCloud Code Analysis
Prefer "expect(manager.undoStack).toHaveLength(0)" over this generic assertion for better reporting; it works on any object with a numeric length property.
See more on https://sonarcloud.io/project/issues?id=DEFRA_interactive-map&issues=AZ_Rp26OKxw6I5xrx9eW&open=AZ_Rp26OKxw6I5xrx9eW&pullRequest=422
Check warning on line 151 in plugins/draw/src/adapters/maplibre/modes/drawMode/undoHandlers.test.js
sonarqubecloud / SonarCloud Code Analysis
Prefer "expect(ctx.map._undoStack).toHaveLength(0)" over this generic assertion for better reporting; it works on any object with a numeric length property.
See more on https://sonarcloud.io/project/issues?id=DEFRA_interactive-map&issues=AZ_Rp2-ZKxw6I5xrx9eq&open=AZ_Rp2-ZKxw6I5xrx9eq&pullRequest=422
Check warning on line 19 in plugins/draw/src/adapters/openlayers/utils/olCoords.js
sonarqubecloud / SonarCloud Code Analysis
Prefer `Math.hypot(…)` over `Math.sqrt(…)`.
See more on https://sonarcloud.io/project/issues?id=DEFRA_interactive-map&issues=AZ_Rp28_Kxw6I5xrx9eg&open=AZ_Rp28_Kxw6I5xrx9eg&pullRequest=422
Check warning on line 165 in plugins/draw/src/adapters/maplibre/modes/drawMode/clickHandlers.test.js
sonarqubecloud / SonarCloud Code Analysis
Prefer "expect(state.polygon.coordinates[0]).toHaveLength(lenBefore)" over this generic assertion for better reporting; it works on any object with a numeric length property.
See more on https://sonarcloud.io/project/issues?id=DEFRA_interactive-map&issues=AZ_Rp2-6Kxw6I5xrx9ey&open=AZ_Rp2-6Kxw6I5xrx9ey&pullRequest=422
Check warning on line 177 in plugins/draw/src/adapters/openlayers/edit/EditMode.test.js
sonarqubecloud / SonarCloud Code Analysis
Prefer "expect(triangle.manager.undoStack).toHaveLength(0)" over this generic assertion for better reporting; it works on any object with a numeric length property.
See more on https://sonarcloud.io/project/issues?id=DEFRA_interactive-map&issues=AZ_Rp26OKxw6I5xrx9eX&open=AZ_Rp26OKxw6I5xrx9eX&pullRequest=422
sonarqubecloud / SonarCloud Code Analysis
Prefer "expect(ctx.map._undoStack).toHaveLength(0)" over this generic assertion for better reporting; it works on any object with a numeric length property.
See more on https://sonarcloud.io/project/issues?id=DEFRA_interactive-map&issues=AZ_Rp2-rKxw6I5xrx9es&open=AZ_Rp2-rKxw6I5xrx9es&pullRequest=422
Check warning on line 118 in plugins/draw/src/adapters/openlayers/edit/EditMode.test.js
sonarqubecloud / SonarCloud Code Analysis
Prefer "expect(manager.undoStack).toHaveLength(1)" over this generic assertion for better reporting; it works on any object with a numeric length property.
See more on https://sonarcloud.io/project/issues?id=DEFRA_interactive-map&issues=AZ_Rp26OKxw6I5xrx9eT&open=AZ_Rp26OKxw6I5xrx9eT&pullRequest=422
Check warning on line 229 in plugins/draw/src/adapters/openlayers/edit/EditMode.test.js
sonarqubecloud / SonarCloud Code Analysis
Prefer "expect(manager.undoStack).toHaveLength(0)" over this generic assertion for better reporting; it works on any object with a numeric length property.
See more on https://sonarcloud.io/project/issues?id=DEFRA_interactive-map&issues=AZ_Rp26OKxw6I5xrx9eY&open=AZ_Rp26OKxw6I5xrx9eY&pullRequest=422
Check warning on line 108 in plugins/draw/src/adapters/openlayers/edit/selectionState.test.js
sonarqubecloud / SonarCloud Code Analysis
Prefer "expect(layers.vertexLayer.update.mock.calls).toHaveLength(calls)" over this generic assertion for better reporting; it works on any object with a numeric length property.
See more on https://sonarcloud.io/project/issues?id=DEFRA_interactive-map&issues=AZ_Rp28TKxw6I5xrx9ea&open=AZ_Rp28TKxw6I5xrx9ea&pullRequest=422