Skip to content

feat(variable): extend string-variable#34

Merged
gregswindle merged 2 commits intomasterfrom
33-feat-extend-string-variable
May 20, 2019
Merged

feat(variable): extend string-variable#34
gregswindle merged 2 commits intomasterfrom
33-feat-extend-string-variable

Conversation

@gregswindle
Copy link
Contributor

git Pull Request Pull Request (PR)

Add operator methods to StringVariable:

  1. endsWith
  2. hasMaxLength
  3. hasMinLength
  4. isEmpty
  5. isNotEmpty
  6. isOneOf
  7. includes
  8. matches
  9. startsWith

Validate arguments to be of an expected type, when
applicable.

Associated issue(s)

Closes #33


  • 1. The acceptance criteria for all associated issues have been
    completed, tested, and validated.
  • 2. The README either reflects my changes or does not require updates.
  • 3. The CONTRIBUTING document either reflects my changes or does not
    require updates.

View the "Code Review Cheat-sheet"...

Rule 1: Review all Code before Releasing it

Do the code reviews before deployment.

Why:

Your team will end up, on average, spending 7% more of its time on building
new features compared with those who do after, and 10% more than those who
don’t do code reviews at all.

Rule 2: All developers review code

Make sure all your developers get to review code.

Why:

This will improve the feeling of empowerment, facilitate knowledge transfer,
and improve developer satisfaction and productivity.

Rule 3: Four-to-Eight (4-8) Hours per Developers per Week

The optimal amount of time to spend on code reviews is between 0.5 to 1 day per
week per developer.

Rule 4: Don't Release Code that Fails Reviews

Make code reviews blocking, that is, don’t deploy before they have been carried
out.

Rule 5: More Rigor, Better Quality and Velocity

Be strict and thorough when reviewing code.

Why:

Your code quality and velocity will thank you.


Code quality summary

Measure Scores
Quality gate Sonar Alert Status Metrics
Duplications Sonar Duplicated Lines Density Metrics
Maintainability Sonar Code Smells Metrics
Sonar Sqale Rating Metrics
Sonar Sqale Index Metrics
Sonar Ncloc Metrics
Reliability Sonar Reliability Rating Metrics
Sonar Bugs Metrics
Security Sonar Security Rating Metrics
Sonar Vulnerabilities Metrics
Test coverage Sonar Coverage Metrics

Code quality, vulnerability, and standards compliance tools

Code Style Linters Test frameworks
JavaScript Style Guide ESLint Jest BDD
Standard JS user guide link-external ESlint user guide link-external Jest user guide link-external

How to format, lint, and test your changes

Open a Terminal, go to the root directory for archetypes-rules, and run:

$ npm test

info Completed tasks are not required to open a PR, and may
be addressed while the PR is open.

alert All tasks must be completed and verified
before a PR may be merged into master, however.

How to test a release

The Pre-release test instructions include step-by-step guidelines for bundling, packing, and testing this module as it would be released on NPM.


Add operator methods:

1. endsWith
2. hasMaxLength
3. hasMinLength
4. isEmpty
5. isNotEmpty
6. isOneOf
7. includes
8. matches
9. startsWith

Validate arguments to be of an expected type, when
applicable.

#33
@gregswindle gregswindle added the type: feature Valuable new or enhanced functionality. ⇧ Bumps the MINOR semver. label May 19, 2019
@gregswindle gregswindle added this to the Extend StringVariable milestone May 19, 2019
@gregswindle gregswindle self-assigned this May 19, 2019
)
}

includes (stringVariable) {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Similar blocks of code found in 2 locations. Consider refactoring.

@gregswindle gregswindle added type: docs Add, edit, or delete instructional material. type: test Adding, correcting, or improving tests (coverage). status: review needed Needs community inspection or approval. labels May 19, 2019
Run sonar-scan locally to produce a report.

#33
@qlty-cloud-legacy
Copy link

Code Climate has analyzed commit f58b844 and detected 6 issues on this pull request.

Here's the issue category breakdown:

Category Count
Duplication 6

View more on Code Climate.

@gregswindle gregswindle merged commit 3e51767 into master May 20, 2019
@gregswindle gregswindle deleted the 33-feat-extend-string-variable branch May 20, 2019 13:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

status: review needed Needs community inspection or approval. type: docs Add, edit, or delete instructional material. type: feature Valuable new or enhanced functionality. ⇧ Bumps the MINOR semver. type: test Adding, correcting, or improving tests (coverage).

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat(variable): add StringVariable operators

1 participant