-
-
Notifications
You must be signed in to change notification settings - Fork 51
Code Quality #5
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
Comments
I agree with a lot of these, but let me go down each bullet point and explain what I think.
Action items with priority:Below is what I think should be done in order of importance.
|
Mergining strategy I think the branching is good, we should always release into GitHub Action I have experience with GH Actions and can provide a PR. Linter I have no experience with linter and typescript so maybe someone else who is more experienced in this combo starts a PR? Static Analysis Yes I'm good with that API Docs I can provide a PR later Readme and badges and wiki let's focus on that later |
Sounds good, I will clean up the dev branch and add protection to master so no one can push directly. Sadly we lose whatever was on dev but worse case we just look at the old dev branch from the original repo. |
@jankapunkt should development be the default branch? I feel like doing so would kinda make master redundant...which then begs the question of why even have a development branch 🤷 |
I have a clear opinion on this: |
@HappyZombies I added a PR regarding branching and contribution guidelines and I would ask to you to work on the maintainers part a bit (which is more closely related to the branching strategy) and let me know what you think of the current state. |
I'm also a fan of:
|
@jwerre good thing is that current tests already use mocha and chai so there is not much to change on their side. I already added NYC for coverage in 10 min or so |
I just realized the // var should = require('should'); // old way
const should = require('chai').should() What a lot of people don't like about should is that it extends the |
I personally love the Chai asserter and I think together with Mocha it has the widest spread of expertise so many people should be familiar with it (yes very meta). I think we should focus on this before we do the other issues because this is a fundamental thing for our CI and future contributions |
What about using expect if we need to rewrite them anyway? |
I don't think you'd need to rewrite anything if you just use Chai's should interface. I'll check it out now and see what happens. |
I just did a find for |
Another code quality tool we could leverage to prevent secrets being pushed: https://github.com/trufflesecurity/truffleHog For tests we could set some fuzzing tools in perspective, that run before a new release may be published: https://github.com/google/oss-fuzz |
Are we going to move forward with ESLint? Perhaps we should start a new issue for this topic and discuss configuration? |
I think we should go for ESLint, I thought about prettier, but having it find code errors will help us catch those undefined errors quickly. In the original project, they started using ESLint but, never got merged to master. Perhaps this is something we can benefit from? https://github.com/oauthjs/node-oauth2-server/blob/dev/.eslintrc |
I agree let's create a separate issue and discuss a potential eslint config |
I think we should set Pull Requests to require at least one passing review to be merged, for critical things like new features or feature changes even two |
@jankapunkt I agree, I will make this change..if i can? lol |
@HappyZombies there should be a setting somewhere that pull requests need approval |
@HappyZombies I think it's part of branch protection rules https://docs.github.com/en/repositories/configuring-branches-and-merges-in-your-repository/defining-the-mergeability-of-pull-requests/managing-a-branch-protection-rule |
Ah I see, I need to make the rule for development branch specifically, got it thanks! |
@jankapunkt Done. btw do you not have access to those settings? I can up your privileges if needed. |
What about actually |
@oklas correct but I also messed up a complete project with rebasing so I stick mostly with merge or squash merge. In which situation I would choose a rebase over merge when approving a pull request? |
I'm okay with merging and squash merging. Rebasing...eh, but personal preference (plus I think more people know about merging, but this shouldn't be a factor in us deciding this) |
I moved details and discussion about situations with |
Is it safe to delete the |
@jankapunkt I was looking at the workflow you set up and I see that it's only testing on node 12. I wonder if it would be better to test in multiple versions? What do you think? Also, see previous comment. |
Once #18 is merged in, any PR moving forward (not the current ones) will have to abide by the commit and PR conventions. |
Also i want to mention that the integration tests are imho basically pointless. Currently everything is mocked with pointless stubs. How you want to check if the scope is valid, if the method always returns a specified return value. It would be better to implement an in memory model. And write unit tests which check the correct behavior of the memory model and then run tests against it. Thus showing us some real issues. |
Closing this issue as other individual items have been made and I believe we have addressed all we could here. |
Some things I'd like to discuss and also work on is code quality and documentation:
There are a few things to decide, like
master
/main
be push-protected?What else?
The text was updated successfully, but these errors were encountered: