Skip to content

Conversation

montymxb
Copy link
Contributor

@montymxb montymxb commented Nov 14, 2017

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.

@montymxb
Copy link
Contributor Author

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.

@montymxb montymxb requested a review from flovilmart November 14, 2017 19:46
.travis.yml Outdated
- 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
Copy link
Contributor

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.

Copy link
Contributor Author

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
Copy link

codecov bot commented Nov 15, 2017

Codecov Report

Merging #4350 into master will increase coverage by 0.74%.
The diff coverage is 89.61%.

Impacted file tree graph

@@            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
Impacted Files Coverage Δ
src/vendor/mongodbUrl.js 90.32% <0%> (-9.68%) ⬇️
src/LiveQuery/RequestSchema.js 100% <100%> (ø) ⬆️
src/RestQuery.js 95.38% <100%> (-0.1%) ⬇️
src/rest.js 98.75% <100%> (-0.04%) ⬇️
src/Controllers/DatabaseController.js 95.57% <100%> (+0.72%) ⬆️
src/Routers/AudiencesRouter.js 100% <100%> (ø) ⬆️
src/Adapters/Auth/linkedin.js 83.33% <100%> (+1.51%) ⬆️
src/Adapters/Storage/StorageUtils.js 100% <100%> (ø)
src/Routers/UsersRouter.js 93.6% <100%> (+0.52%) ⬆️
src/Adapters/Auth/meetup.js 88.88% <100%> (+4.67%) ⬆️
... and 29 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update e1d04cd...a83fd2c. Read the comment docs.

@montymxb montymxb requested a review from flovilmart November 22, 2017 00:34
@flovilmart flovilmart added this to the 2.7.0 milestone Nov 25, 2017
@flovilmart
Copy link
Contributor

@montymxb after all those merges, it's kinda borked now :/

@montymxb
Copy link
Contributor Author

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.

@montymxb montymxb closed this Nov 26, 2017
@flovilmart flovilmart deleted the jsinspect branch May 1, 2018 17:37
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