-
-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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
Add JSInspect to CI #4350
Add JSInspect to CI #4350
Conversation
Tests are expected to fail as is due to present duplications in the codebase. Assuming this is a feature that we would be interested in I would provide the necessary changes to pass in the same PR here. |
.travis.yml
Outdated
- node -e 'require("./lib/index.js")' | ||
- psql -c 'create database parse_server_postgres_adapter_test_database;' -U postgres | ||
- psql -c 'CREATE EXTENSION postgis;' -U postgres -d parse_server_postgres_adapter_test_database | ||
- psql -c 'CREATE EXTENSION postgis_topology;' -U postgres -d parse_server_postgres_adapter_test_database | ||
- silent=1 mongodb-runner --start | ||
script: | ||
- jsinspect ./src && npm test |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we could run in before_script right? any failure would be caught.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah we can do that if we don't want to fudge with just script
.
Codecov Report
@@ Coverage Diff @@
## master #4350 +/- ##
==========================================
+ Coverage 92.64% 93.39% +0.74%
==========================================
Files 119 122 +3
Lines 8435 8322 -113
==========================================
- Hits 7815 7772 -43
+ Misses 620 550 -70
Continue to review full report at Codecov.
|
@montymxb after all those merges, it's kinda borked now :/ |
Yeah just a bit 🤣 . I'm thinking it would be best to close this as nonessential. Instead I'll cherry pick some changes and present them without forcing jsinspect. There were quite a few that would make good additions, but I think they would be more appropriate as separate PRs. Not only that but it would be easier to review if it were small groups of related changes, one at a time. |
Proposes to add jsinspect to our CI in order to catch and flag code duplication issues. As is there are several files that contain nearly identical logic, which makes maintenance/updates not quite as easy (or error free) as it should be. Ideally this should help force us to consolidate logic rather than to duplicate it, whether by intention or accident.
This is in response to recent issues #3432 and #3451. The overall checking process is rather quick, and shouldn't cause any noticeable issues with overhead or increased time for tests.