hypery2k/nativescript-urlhandler

View on GitHub

Showing 8 of 22 total issues

Function exports has 206 lines of code (exceeds 25 allowed). Consider refactoring.
Open

module.exports = env => {
    // Add your custom Activities, Services and other Android app components here.
    const appComponents = [
        "tns-core-modules/ui/frame",
        "tns-core-modules/ui/frame/activity",
Severity: Major
Found in demo-angular/webpack.config.js - About 1 day to fix

    Function exports has 184 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

    module.exports = env => {
        // Add your custom Activities, Services and other Android app components here.
        const appComponents = [
            "tns-core-modules/ui/frame",
            "tns-core-modules/ui/frame/activity",
    Severity: Major
    Found in demo/webpack.config.js - About 7 hrs to fix

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

      export function extractAppURL(urlParam: any): AppURL {
          if (!!urlParam) {
              let url = urlParam.toString(),
                  params = new Map<string, string>(),
                  urlWithPath = url.indexOf('//') < url.length - 2,
      Severity: Minor
      Found in src/urlhandler.common.ts - 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 exports has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring.
      Open

      module.exports = env => {
          // Add your custom Activities, Services and other Android app components here.
          const appComponents = [
              "tns-core-modules/ui/frame",
              "tns-core-modules/ui/frame/activity",
      Severity: Minor
      Found in demo-angular/webpack.config.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 exports has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring.
      Open

      module.exports = env => {
          // Add your custom Activities, Services and other Android app components here.
          const appComponents = [
              "tns-core-modules/ui/frame",
              "tns-core-modules/ui/frame/activity",
      Severity: Minor
      Found in demo/webpack.config.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 exports has 37 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

      module.exports = function(config) {
          config.set({
      
              // base path that will be used to resolve all patterns (eg. files, exclude)
              basePath: '',
      Severity: Minor
      Found in demo/karma.conf.js - About 1 hr to fix

        Function exports has 32 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

        module.exports = function(config) {
          config.set({
        
            // base path that will be used to resolve all patterns (eg. files, exclude)
            basePath: '',
        Severity: Minor
        Found in demo-angular/karma.conf.js - About 1 hr to fix

          Function handleIntent has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
          Open

          export function handleIntent(intent: any) {
              let data = intent.getData();
              try {
                  let appURL = extractAppURL(data);
                  if (appURL != null &&
          Severity: Minor
          Found in src/urlhandler.android.ts - About 25 mins 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

          Severity
          Category
          Status
          Source
          Language