wordnik/swagger-editor

View on GitHub

Showing 206 of 206 total issues

Function condenseErrors has 55 lines of code (exceeds 25 allowed). Consider refactoring.
Open

export function condenseErrors(errors) {
  if (!Array.isArray(errors)) {
    return []
  }

Severity: Major
Found in src/plugins/json-schema-validator/validator/condense-errors.js - About 2 hrs to fix

    Function render has 53 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

      render() { 
        let addedOption = <span />
        const addButton = <a role="button" className="d-inline-block float-right" onClick={this.showAddField} onKeyDown={this.onEnterKeyPress} tabIndex={0}>Add</a>
        if (this.props.isValidAddition) {
          if (this.state.showAddOption) {
    Severity: Major
    Found in src/standalone/topbar-insert/forms/components/FormDropdown.jsx - About 2 hrs to fix

      Function validateOAS3SchemaPropertiesReadOnlyWriteNotBothTrue has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring.
      Open

      export const validateOAS3SchemaPropertiesReadOnlyWriteNotBothTrue = () => (system) => {
        return system.validateSelectors
          .allSchemas()
          .then(nodes => {
            return nodes.reduce((acc, node) => {
      Severity: Minor
      Found in src/plugins/validate-semantic/validators/oas3/schemas.js - About 2 hrs to fix

      Cognitive Complexity

      Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

      A method's cognitive complexity is based on a few simple rules:

      • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
      • Code is considered more complex for each "break in the linear flow of the code"
      • Code is considered more complex when "flow breaking structures are nested"

      Further reading

      Function isSubSchema has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring.
      Open

      export const isSubSchema = (state, node) => (sys) => {
        const path = node.path
        if(path.length < 3) {
          return false
        }
      Severity: Minor
      Found in src/plugins/validate-semantic/selectors.js - About 1 hr to fix

      Cognitive Complexity

      Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

      A method's cognitive complexity is based on a few simple rules:

      • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
      • Code is considered more complex for each "break in the linear flow of the code"
      • Code is considered more complex when "flow breaking structures are nested"

      Further reading

      Function makeEditor has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring.
      Open

      export default function makeEditor({ editorPluginsToRun }) {
      
        class Editor extends React.Component {
      
          constructor(props, context) {
      Severity: Minor
      Found in src/plugins/editor/components/editor.jsx - About 1 hr to fix

      Cognitive Complexity

      Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

      A method's cognitive complexity is based on a few simple rules:

      • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
      • Code is considered more complex for each "break in the linear flow of the code"
      • Code is considered more complex when "flow breaking structures are nested"

      Further reading

      Identical blocks of code found in 2 locations. Consider refactoring.
      Open

      function suggestionFromSchema(map) {
        const res = toArray(mapValues(map, (val, key) => {
          const keyword = get(val, "__value", key)
          const meta = isPlainObject(val) ? "object" : "keyword"
      
      
      src/plugins/editor-autosuggest-keywords/get-keywords-for-path.js on lines 135..143

      Duplicated Code

      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

      Tuning

      This issue has a mass of 73.

      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

      Refactorings

      Further Reading

      Similar blocks of code found in 11 locations. Consider refactoring.
      Open

      export const allSubSchemas = () => (system) => {
        return system.fn.traverseOnce({
          name: "allSubSchemas",
          fn: (node) => {
            if(system.validateSelectors.isSubSchema(node)) {
      Severity: Major
      Found in src/plugins/validate-semantic/selectors.js and 10 other locations - About 1 hr to fix
      src/plugins/validate-semantic/selectors.js on lines 111..120
      src/plugins/validate-semantic/selectors.js on lines 162..171
      src/plugins/validate-semantic/selectors.js on lines 173..182
      src/plugins/validate-semantic/selectors.js on lines 194..203
      src/plugins/validate-semantic/selectors.js on lines 216..225
      src/plugins/validate-semantic/selectors.js on lines 227..236
      src/plugins/validate-semantic/selectors.js on lines 252..261
      src/plugins/validate-semantic/selectors.js on lines 277..288
      src/plugins/validate-semantic/selectors.js on lines 290..299
      src/plugins/validate-semantic/selectors.js on lines 301..310

      Duplicated Code

      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

      Tuning

      This issue has a mass of 73.

      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

      Refactorings

      Further Reading

      Similar blocks of code found in 11 locations. Consider refactoring.
      Open

      export const allResponseSchemas = () => (system) => {
        return system.fn.traverseOnce({
          name: "allResponseSchemas",
          fn: (node) => {
            if(system.validateSelectors.isResponseSchema(node)) {
      Severity: Major
      Found in src/plugins/validate-semantic/selectors.js and 10 other locations - About 1 hr to fix
      src/plugins/validate-semantic/selectors.js on lines 111..120
      src/plugins/validate-semantic/selectors.js on lines 162..171
      src/plugins/validate-semantic/selectors.js on lines 173..182
      src/plugins/validate-semantic/selectors.js on lines 194..203
      src/plugins/validate-semantic/selectors.js on lines 205..214
      src/plugins/validate-semantic/selectors.js on lines 216..225
      src/plugins/validate-semantic/selectors.js on lines 227..236
      src/plugins/validate-semantic/selectors.js on lines 252..261
      src/plugins/validate-semantic/selectors.js on lines 277..288
      src/plugins/validate-semantic/selectors.js on lines 290..299

      Duplicated Code

      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

      Tuning

      This issue has a mass of 73.

      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

      Refactorings

      Further Reading

      Similar blocks of code found in 11 locations. Consider refactoring.
      Open

      export const allResponses = () => (system) => {
        return system.fn.traverseOnce({
          name: "allResponses",
          fn: (node) => {
            if(system.validateSelectors.isResponse(node)) {
      Severity: Major
      Found in src/plugins/validate-semantic/selectors.js and 10 other locations - About 1 hr to fix
      src/plugins/validate-semantic/selectors.js on lines 162..171
      src/plugins/validate-semantic/selectors.js on lines 173..182
      src/plugins/validate-semantic/selectors.js on lines 194..203
      src/plugins/validate-semantic/selectors.js on lines 205..214
      src/plugins/validate-semantic/selectors.js on lines 216..225
      src/plugins/validate-semantic/selectors.js on lines 227..236
      src/plugins/validate-semantic/selectors.js on lines 252..261
      src/plugins/validate-semantic/selectors.js on lines 277..288
      src/plugins/validate-semantic/selectors.js on lines 290..299
      src/plugins/validate-semantic/selectors.js on lines 301..310

      Duplicated Code

      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

      Tuning

      This issue has a mass of 73.

      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

      Refactorings

      Further Reading

      Similar blocks of code found in 11 locations. Consider refactoring.
      Open

      export const allParameters = () => (system) => {
        return system.fn.traverseOnce({
          name: "allParameters",
          fn: (node) => {
            if(system.validateSelectors.isParameter(node)) {
      Severity: Major
      Found in src/plugins/validate-semantic/selectors.js and 10 other locations - About 1 hr to fix
      src/plugins/validate-semantic/selectors.js on lines 111..120
      src/plugins/validate-semantic/selectors.js on lines 173..182
      src/plugins/validate-semantic/selectors.js on lines 194..203
      src/plugins/validate-semantic/selectors.js on lines 205..214
      src/plugins/validate-semantic/selectors.js on lines 216..225
      src/plugins/validate-semantic/selectors.js on lines 227..236
      src/plugins/validate-semantic/selectors.js on lines 252..261
      src/plugins/validate-semantic/selectors.js on lines 277..288
      src/plugins/validate-semantic/selectors.js on lines 290..299
      src/plugins/validate-semantic/selectors.js on lines 301..310

      Duplicated Code

      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

      Tuning

      This issue has a mass of 73.

      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

      Refactorings

      Further Reading

      Similar blocks of code found in 11 locations. Consider refactoring.
      Open

      export const all$refArtifacts = () => (system) => {
        return system.fn.traverseOnce({
          name: "all$refArtifacts",
          fn: (node) => {
            if(system.validateSelectors.isRefArtifact(node)) {
      Severity: Major
      Found in src/plugins/validate-semantic/selectors.js and 10 other locations - About 1 hr to fix
      src/plugins/validate-semantic/selectors.js on lines 111..120
      src/plugins/validate-semantic/selectors.js on lines 162..171
      src/plugins/validate-semantic/selectors.js on lines 173..182
      src/plugins/validate-semantic/selectors.js on lines 194..203
      src/plugins/validate-semantic/selectors.js on lines 205..214
      src/plugins/validate-semantic/selectors.js on lines 216..225
      src/plugins/validate-semantic/selectors.js on lines 252..261
      src/plugins/validate-semantic/selectors.js on lines 277..288
      src/plugins/validate-semantic/selectors.js on lines 290..299
      src/plugins/validate-semantic/selectors.js on lines 301..310

      Duplicated Code

      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

      Tuning

      This issue has a mass of 73.

      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

      Refactorings

      Further Reading

      Similar blocks of code found in 11 locations. Consider refactoring.
      Open

      export const allParameterSchemas = () => (system) => {
        return system.fn.traverseOnce({
          name: "allParameterSchemas",
          fn: (node) => {
            if(system.validateSelectors.isParameterSchema(node)) {
      Severity: Major
      Found in src/plugins/validate-semantic/selectors.js and 10 other locations - About 1 hr to fix
      src/plugins/validate-semantic/selectors.js on lines 111..120
      src/plugins/validate-semantic/selectors.js on lines 162..171
      src/plugins/validate-semantic/selectors.js on lines 173..182
      src/plugins/validate-semantic/selectors.js on lines 194..203
      src/plugins/validate-semantic/selectors.js on lines 205..214
      src/plugins/validate-semantic/selectors.js on lines 216..225
      src/plugins/validate-semantic/selectors.js on lines 227..236
      src/plugins/validate-semantic/selectors.js on lines 277..288
      src/plugins/validate-semantic/selectors.js on lines 290..299
      src/plugins/validate-semantic/selectors.js on lines 301..310

      Duplicated Code

      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

      Tuning

      This issue has a mass of 73.

      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

      Refactorings

      Further Reading

      Similar blocks of code found in 11 locations. Consider refactoring.
      Open

      export const allTags = () => (system) => {
        return system.fn.traverseOnce({
          name: "allTags",
          fn: (node) => {
            if(system.validateSelectors.isTag(node)) {
      Severity: Major
      Found in src/plugins/validate-semantic/selectors.js and 10 other locations - About 1 hr to fix
      src/plugins/validate-semantic/selectors.js on lines 111..120
      src/plugins/validate-semantic/selectors.js on lines 162..171
      src/plugins/validate-semantic/selectors.js on lines 173..182
      src/plugins/validate-semantic/selectors.js on lines 205..214
      src/plugins/validate-semantic/selectors.js on lines 216..225
      src/plugins/validate-semantic/selectors.js on lines 227..236
      src/plugins/validate-semantic/selectors.js on lines 252..261
      src/plugins/validate-semantic/selectors.js on lines 277..288
      src/plugins/validate-semantic/selectors.js on lines 290..299
      src/plugins/validate-semantic/selectors.js on lines 301..310

      Duplicated Code

      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

      Tuning

      This issue has a mass of 73.

      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

      Refactorings

      Further Reading

      Similar blocks of code found in 11 locations. Consider refactoring.
      Open

      export const allOAS3RequestBodySchemas = () => (system) => {
        return system.fn.traverseOnce({
          name: "allOAS3RequestBodySchemas",
          fn: (node) => {
            if(
      Severity: Major
      Found in src/plugins/validate-semantic/selectors.js and 10 other locations - About 1 hr to fix
      src/plugins/validate-semantic/selectors.js on lines 111..120
      src/plugins/validate-semantic/selectors.js on lines 162..171
      src/plugins/validate-semantic/selectors.js on lines 173..182
      src/plugins/validate-semantic/selectors.js on lines 194..203
      src/plugins/validate-semantic/selectors.js on lines 205..214
      src/plugins/validate-semantic/selectors.js on lines 216..225
      src/plugins/validate-semantic/selectors.js on lines 227..236
      src/plugins/validate-semantic/selectors.js on lines 252..261
      src/plugins/validate-semantic/selectors.js on lines 290..299
      src/plugins/validate-semantic/selectors.js on lines 301..310

      Duplicated Code

      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

      Tuning

      This issue has a mass of 73.

      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

      Refactorings

      Further Reading

      Identical blocks of code found in 2 locations. Consider refactoring.
      Open

      function suggestionFromSchema(map) {
        const res = toArray(mapValues(map, (val, key) => {
          const keyword = get(val, "__value", key)
          const meta = isPlainObject(val) ? "object" : "keyword"
      
      
      src/plugins/editor-autosuggest-oas3-keywords/get-keywords-for-path.js on lines 135..143

      Duplicated Code

      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

      Tuning

      This issue has a mass of 73.

      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

      Refactorings

      Further Reading

      Similar blocks of code found in 11 locations. Consider refactoring.
      Open

      export const allOAS3RequestBodies = () => (system) => {
        return system.fn.traverseOnce({
          name: "allOAS3RequestBodies",
          fn: (node) => {
            if(system.validateSelectors.isOAS3RequestBody(node)) {
      Severity: Major
      Found in src/plugins/validate-semantic/selectors.js and 10 other locations - About 1 hr to fix
      src/plugins/validate-semantic/selectors.js on lines 111..120
      src/plugins/validate-semantic/selectors.js on lines 162..171
      src/plugins/validate-semantic/selectors.js on lines 194..203
      src/plugins/validate-semantic/selectors.js on lines 205..214
      src/plugins/validate-semantic/selectors.js on lines 216..225
      src/plugins/validate-semantic/selectors.js on lines 227..236
      src/plugins/validate-semantic/selectors.js on lines 252..261
      src/plugins/validate-semantic/selectors.js on lines 277..288
      src/plugins/validate-semantic/selectors.js on lines 290..299
      src/plugins/validate-semantic/selectors.js on lines 301..310

      Duplicated Code

      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

      Tuning

      This issue has a mass of 73.

      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

      Refactorings

      Further Reading

      Similar blocks of code found in 11 locations. Consider refactoring.
      Open

      export const allHeaders = () => (system) => {
        return system.fn.traverseOnce({
          name: "allHeader",
          fn: (node) => {
            if(system.validateSelectors.isHeader(node)) {
      Severity: Major
      Found in src/plugins/validate-semantic/selectors.js and 10 other locations - About 1 hr to fix
      src/plugins/validate-semantic/selectors.js on lines 111..120
      src/plugins/validate-semantic/selectors.js on lines 162..171
      src/plugins/validate-semantic/selectors.js on lines 173..182
      src/plugins/validate-semantic/selectors.js on lines 194..203
      src/plugins/validate-semantic/selectors.js on lines 205..214
      src/plugins/validate-semantic/selectors.js on lines 216..225
      src/plugins/validate-semantic/selectors.js on lines 227..236
      src/plugins/validate-semantic/selectors.js on lines 252..261
      src/plugins/validate-semantic/selectors.js on lines 277..288
      src/plugins/validate-semantic/selectors.js on lines 301..310

      Duplicated Code

      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

      Tuning

      This issue has a mass of 73.

      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

      Refactorings

      Further Reading

      Similar blocks of code found in 11 locations. Consider refactoring.
      Open

      export const all$refs = () => (system) => {
        return system.fn.traverseOnce({
          name: "all$refs",
          fn: (node) => {
            if(system.validateSelectors.isRef(node)) {
      Severity: Major
      Found in src/plugins/validate-semantic/selectors.js and 10 other locations - About 1 hr to fix
      src/plugins/validate-semantic/selectors.js on lines 111..120
      src/plugins/validate-semantic/selectors.js on lines 162..171
      src/plugins/validate-semantic/selectors.js on lines 173..182
      src/plugins/validate-semantic/selectors.js on lines 194..203
      src/plugins/validate-semantic/selectors.js on lines 205..214
      src/plugins/validate-semantic/selectors.js on lines 227..236
      src/plugins/validate-semantic/selectors.js on lines 252..261
      src/plugins/validate-semantic/selectors.js on lines 277..288
      src/plugins/validate-semantic/selectors.js on lines 290..299
      src/plugins/validate-semantic/selectors.js on lines 301..310

      Duplicated Code

      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

      Tuning

      This issue has a mass of 73.

      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

      Refactorings

      Further Reading

      Identical blocks of code found in 2 locations. Consider refactoring.
      Open

      const tagItem = (updateForm, path) => 
        fromJS({ 
          tag: {
            value: "",
            isRequired: true, 
      src/standalone/topbar-insert/forms/form-objects/operation-object.js on lines 3..13

      Duplicated Code

      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

      Tuning

      This issue has a mass of 72.

      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

      Refactorings

      Further Reading

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

      export const isOAS3RequestBodySchema = (state, node) => () => {
        const [key,, gpKey, ggpKey] = node.path.slice().reverse()
      
        return key === "schema"
          && gpKey === "content"
      Severity: Major
      Found in src/plugins/validate-semantic/selectors.js and 1 other location - About 1 hr to fix
      src/plugins/validate-semantic/selectors.js on lines 88..94

      Duplicated Code

      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

      Tuning

      This issue has a mass of 72.

      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

      Refactorings

      Further Reading

      Severity
      Category
      Status
      Source
      Language