Opetushallitus/eperusteet-opintopolku

View on GitHub

Showing 414 of 607 total issues

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

  @Getter((state, getters) => {
    const root = getters.sidenav;
    const result: Array<NavigationNode> = [];

    function traverseTree(node: NavigationNode) {
Severity: Major
Found in src/stores/PerusteDataStore.ts and 2 other locations - About 5 hrs to fix
src/stores/OpetussuunnitelmaDataStore.ts on lines 277..296
src/stores/ToteutussuunnitelmaDataStore.ts on lines 179..198

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 136.

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 3 locations. Consider refactoring.
Open

  @Getter((state, getters) => {
    const root = getters.sidenav;
    const result: Array<NavigationNode> = [];

    function traverseTree(node: NavigationNode) {
Severity: Major
Found in src/stores/ToteutussuunnitelmaDataStore.ts and 2 other locations - About 5 hrs to fix
src/stores/OpetussuunnitelmaDataStore.ts on lines 277..296
src/stores/PerusteDataStore.ts on lines 200..219

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 136.

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 3 locations. Consider refactoring.
Open

                            if ($scope.hakuparametrit.koulutusala) {
                                $scope.opintoalat = (<any>_.findWhere($scope.koulutusalat, {
                                    koodi: $scope.hakuparametrit.koulutusala
                                })).opintoalat;
                                _.each($scope.opintoalat, ala => {
eperusteet-opintopolku-app/yo/app/scripts/views/haku/haku.ts on lines 234..244
eperusteet-opintopolku-app/yo/app/states/selaus/ammatillinenkoulutus/state.ts on lines 280..290

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 131.

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 3 locations. Consider refactoring.
Open

                            if ($scope.hakuparametrit.koulutusala) {
                                $scope.opintoalat = (<any>_.findWhere($scope.koulutusalat, {
                                    koodi: $scope.hakuparametrit.koulutusala
                                })).opintoalat;
                                _.each($scope.opintoalat, ala => {
eperusteet-opintopolku-app/yo/app/scripts/views/haku/haku.ts on lines 234..244
eperusteet-opintopolku-app/yo/app/states/selaus/ammatillinenkoulutus/state.ts on lines 548..558

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 131.

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 3 locations. Consider refactoring.
Open

            if ($scope.hakuparametrit.koulutusala) {
                $scope.opintoalat = (<any>_.findWhere($scope.koulutusalat, {
                    koodi: $scope.hakuparametrit.koulutusala
                })).opintoalat;
                _.each($scope.opintoalat, ala => {
eperusteet-opintopolku-app/yo/app/states/selaus/ammatillinenkoulutus/state.ts on lines 280..290
eperusteet-opintopolku-app/yo/app/states/selaus/ammatillinenkoulutus/state.ts on lines 548..558

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 131.

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

    const rakennaOppiaineetMenu = oppiaineet => {
        let menu = [];
        _.each(oppiaineSort(oppiaineet), function(oa) {
            buildOppiaineItem(menu, oa, null, 0, null, null, { menuType: "oppiaineetMenu" });
            if (oa.koosteinen && oa.oppimaarat.length > 0) {
eperusteet-opintopolku-app/yo/app/scripts/views/ops/opsutils.ts on lines 182..193

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 128.

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

    var rakennaOppiaineetMenu = function(oppiaineet) {
        var menu = [];
        _.each(oppiaineSort(oppiaineet), function(oa) {
            buildOppiaineItem(menu, oa, null, 0, null, null, { menuType: "oppiaineetMenu" });
            if (oa.koosteinen && oa.oppimaarat.length > 0) {
eperusteet-opintopolku-app/yo/app/scripts/common/services/opsmenubuilders.ts on lines 203..214

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 128.

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 4 locations. Consider refactoring.
Open

              {
                'kuvaus': {
                  '_tunniste': '8284beda-3d48-46a9-9d00-12e08ceccd7f',
                  'fi': 'Tutkinnon osa sisältää ammatillista osaamista tukevia korkeakouluopintoja.',
                  'sv': 'Examensdelen omfattar högskolestudier som stöder det yrkesinriktade kunnandet.',
Severity: Major
Found in src/components/EpAmmatillinen/tests/data.ts and 3 other locations - About 4 hrs to fix
src/components/EpAmmatillinen/tests/data.ts on lines 541..570
src/components/EpAmmatillinen/tests/data.ts on lines 571..600
src/components/EpAmmatillinen/tests/data.ts on lines 712..741

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 127.

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 4 locations. Consider refactoring.
Open

              {
                'kuvaus': {
                  '_tunniste': 'be7d5169-512d-4ba2-b085-c43e142f55e8',
                  'fi': 'Tutkinnon osa sisältää työelämän paikallisten tarpeiden mukaista osaamista, joka soveltuu useamman kuin yhden työpaikan tarpeisiin. Koulutuksen järjestäjä nimeää tutkinnon osan työelämän toimintakokonaisuuden pohjalta ja määrittää sille laajuuden osaamispisteinä. Koulutuksen järjestäjä määrittelee ammattitaitovaatimukset ja osaamisen arvioinnin vastaavasti kuin ammatillisissa tutkinnon osissa.',
                  'sv': 'Examensdelen omfattar kunnande som grundar sig arbetslivets lokala behov och som lämpar sig för fler än en arbetsplats. Utbildningsanordnaren namnger examensdelen utifrån en verksamhetshelhet i arbetslivet och fastställer omfattningen på den i kompetenspoäng. Utbildningsanordnaren fastställer kraven på yrkesskicklighet och bedömning av kunnandet på motsvarande sätt som i de yrkesinriktade examensdelarna.',
Severity: Major
Found in src/components/EpAmmatillinen/tests/data.ts and 3 other locations - About 4 hrs to fix
src/components/EpAmmatillinen/tests/data.ts on lines 571..600
src/components/EpAmmatillinen/tests/data.ts on lines 601..630
src/components/EpAmmatillinen/tests/data.ts on lines 712..741

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 127.

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 4 locations. Consider refactoring.
Open

              {
                'kuvaus': {
                  '_tunniste': '7dd83e52-e55d-4b9d-b7eb-4b2fb9495f0b',
                  'fi': 'Tutkintoon voi sisällyttää tutkinnon osan toisesta ammatillisesta perustutkinnosta, ammattitutkinnosta tai erikoisammattitutkinnosta. Riippumatta sisällytettävän tutkinnon osan laajuudesta, tutkinnon osan laajuus on tässä kohdassa enintään 15 osaamispistettä.',
                  'sv': 'I examen kan ingå en examensdel från en annan yrkesinriktad grundexamen, yrkesexamen eller specialyrkesexamen. Oberoende av omfattningen på examensdelen som ska ingå utgör omfattningen på examensdelen i det här fallet högst 15 kompetenspoäng.',
Severity: Major
Found in src/components/EpAmmatillinen/tests/data.ts and 3 other locations - About 4 hrs to fix
src/components/EpAmmatillinen/tests/data.ts on lines 541..570
src/components/EpAmmatillinen/tests/data.ts on lines 601..630
src/components/EpAmmatillinen/tests/data.ts on lines 712..741

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 127.

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 4 locations. Consider refactoring.
Open

          {
            'kuvaus': {
              '_tunniste': '254f7dab-81bc-4a85-a820-344ccae4bb71',
              'fi': 'Yhteisten tutkinnon osien valinnaiset osaamistavoitteet voivat olla tutkinnon perusteissa määrättyjä tai koulutuksen järjestäjän päättämiä muita valinnaisia osaamistavoitteita, jotka tukevat kyseisen tutkinnon osan ja sen osa-alueiden tutkinnon perusteissa määrättyjä tavoitteita. Valinnaisiin osaamistavoitteisiin voidaan sisällyttää myös opiskelijan aiemmin hankkimaa osaamista, joka tukee kyseisen tutkinnon osan ja sen osa-alueiden tutkinnon perusteissa määrättyjä osaamistavoitteita.',
              'sv': 'De valbara målen för kunnandet inom de gemensamma examensdelarna omfattar 8 kp och kan vara valbara mål för kunnandet som är fastställda i examensgrunderna eller andra valbara mål som utbildningsanordnaren beslutat om och som stöder målen för kunnandet som är fastställda för den ifrågavarande examensdelen och dess delområden i examensgrunderna. I de valbara målen för kunnandet kan också ingå kunnande som den studerande förvärvat tidigare och som stöder målen för kunnandet som är fastställda för den ifrågavarande examensdelen och dess delområden i examensgrunderna.',
Severity: Major
Found in src/components/EpAmmatillinen/tests/data.ts and 3 other locations - About 4 hrs to fix
src/components/EpAmmatillinen/tests/data.ts on lines 541..570
src/components/EpAmmatillinen/tests/data.ts on lines 571..600
src/components/EpAmmatillinen/tests/data.ts on lines 601..630

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 127.

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 8 locations. Consider refactoring.
Open

angular.module("app").config($stateProvider =>
    $stateProvider.state("root.varhaiskasvatus.tekstikappale", {
        url: "/tekstikappale/:tekstikappaleId",
        templateUrl: "eperusteet-esitys/views/tekstikappale.html",
        controller: Controllers.epEsitysSisaltoController,
eperusteet-opintopolku-app/yo/app/states/esiopetus/tekstikappale/state.ts on lines 1..14
eperusteet-opintopolku-app/yo/app/states/lisaopetus/tekstikappale/state.ts on lines 1..16
eperusteet-opintopolku-app/yo/app/states/opas/tekstikappale/state.ts on lines 1..14
eperusteet-opintopolku-app/yo/app/states/perusvalmistava/tekstikappale/state.ts on lines 1..16
eperusteet-opintopolku-app/yo/app/states/tpo/taiteenala/state.ts on lines 1..14
eperusteet-opintopolku-app/yo/app/states/tpo/taiteenalaOsa/state.ts on lines 1..14
eperusteet-opintopolku-app/yo/app/states/tpo/tekstikappale/state.ts on lines 1..14

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 126.

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 8 locations. Consider refactoring.
Open

angular.module("app").config($stateProvider =>
    $stateProvider.state("root.opas.tekstikappale", {
        url: "/tekstikappale/:tekstikappaleId",
        templateUrl: "eperusteet-esitys/views/tekstikappale.html",
        controller: Controllers.epEsitysSisaltoController,
eperusteet-opintopolku-app/yo/app/states/esiopetus/tekstikappale/state.ts on lines 1..14
eperusteet-opintopolku-app/yo/app/states/lisaopetus/tekstikappale/state.ts on lines 1..16
eperusteet-opintopolku-app/yo/app/states/perusvalmistava/tekstikappale/state.ts on lines 1..16
eperusteet-opintopolku-app/yo/app/states/tpo/taiteenala/state.ts on lines 1..14
eperusteet-opintopolku-app/yo/app/states/tpo/taiteenalaOsa/state.ts on lines 1..14
eperusteet-opintopolku-app/yo/app/states/tpo/tekstikappale/state.ts on lines 1..14
eperusteet-opintopolku-app/yo/app/states/varhaiskasvatus/tekstikappale/state.ts on lines 1..16

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 126.

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 8 locations. Consider refactoring.
Open

angular.module("app").config($stateProvider =>
    $stateProvider.state("root.lisaopetus.tekstikappale", {
        url: "/tekstikappale/:tekstikappaleId",
        templateUrl: "eperusteet-esitys/views/tekstikappale.html",
        controller: Controllers.epEsitysSisaltoController,
eperusteet-opintopolku-app/yo/app/states/esiopetus/tekstikappale/state.ts on lines 1..14
eperusteet-opintopolku-app/yo/app/states/opas/tekstikappale/state.ts on lines 1..14
eperusteet-opintopolku-app/yo/app/states/perusvalmistava/tekstikappale/state.ts on lines 1..16
eperusteet-opintopolku-app/yo/app/states/tpo/taiteenala/state.ts on lines 1..14
eperusteet-opintopolku-app/yo/app/states/tpo/taiteenalaOsa/state.ts on lines 1..14
eperusteet-opintopolku-app/yo/app/states/tpo/tekstikappale/state.ts on lines 1..14
eperusteet-opintopolku-app/yo/app/states/varhaiskasvatus/tekstikappale/state.ts on lines 1..16

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 126.

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 8 locations. Consider refactoring.
Open

angular.module("app").config($stateProvider =>
    $stateProvider.state("root.tpo.taiteenala", {
        url: "/taiteenala/:tekstikappaleId",
        templateUrl: "views/tpo/taiteenala.html",
        controller: Controllers.epEsitysSisaltoController,
eperusteet-opintopolku-app/yo/app/states/esiopetus/tekstikappale/state.ts on lines 1..14
eperusteet-opintopolku-app/yo/app/states/lisaopetus/tekstikappale/state.ts on lines 1..16
eperusteet-opintopolku-app/yo/app/states/opas/tekstikappale/state.ts on lines 1..14
eperusteet-opintopolku-app/yo/app/states/perusvalmistava/tekstikappale/state.ts on lines 1..16
eperusteet-opintopolku-app/yo/app/states/tpo/taiteenalaOsa/state.ts on lines 1..14
eperusteet-opintopolku-app/yo/app/states/tpo/tekstikappale/state.ts on lines 1..14
eperusteet-opintopolku-app/yo/app/states/varhaiskasvatus/tekstikappale/state.ts on lines 1..16

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 126.

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 8 locations. Consider refactoring.
Open

angular.module("app").config($stateProvider =>
    $stateProvider.state("root.esiopetus.tekstikappale", {
        url: "/tekstikappale/:tekstikappaleId",
        templateUrl: "eperusteet-esitys/views/tekstikappale.html",
        controller: Controllers.epEsitysSisaltoController,
eperusteet-opintopolku-app/yo/app/states/lisaopetus/tekstikappale/state.ts on lines 1..16
eperusteet-opintopolku-app/yo/app/states/opas/tekstikappale/state.ts on lines 1..14
eperusteet-opintopolku-app/yo/app/states/perusvalmistava/tekstikappale/state.ts on lines 1..16
eperusteet-opintopolku-app/yo/app/states/tpo/taiteenala/state.ts on lines 1..14
eperusteet-opintopolku-app/yo/app/states/tpo/taiteenalaOsa/state.ts on lines 1..14
eperusteet-opintopolku-app/yo/app/states/tpo/tekstikappale/state.ts on lines 1..14
eperusteet-opintopolku-app/yo/app/states/varhaiskasvatus/tekstikappale/state.ts on lines 1..16

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 126.

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 8 locations. Consider refactoring.
Open

angular.module("app").config($stateProvider =>
    $stateProvider.state("root.tpo.tekstikappale", {
        url: "/tekstikappale/:tekstikappaleId",
        templateUrl: "views/tpo/tekstikappale.html",
        controller: Controllers.epEsitysSisaltoController,
eperusteet-opintopolku-app/yo/app/states/esiopetus/tekstikappale/state.ts on lines 1..14
eperusteet-opintopolku-app/yo/app/states/lisaopetus/tekstikappale/state.ts on lines 1..16
eperusteet-opintopolku-app/yo/app/states/opas/tekstikappale/state.ts on lines 1..14
eperusteet-opintopolku-app/yo/app/states/perusvalmistava/tekstikappale/state.ts on lines 1..16
eperusteet-opintopolku-app/yo/app/states/tpo/taiteenala/state.ts on lines 1..14
eperusteet-opintopolku-app/yo/app/states/tpo/taiteenalaOsa/state.ts on lines 1..14
eperusteet-opintopolku-app/yo/app/states/varhaiskasvatus/tekstikappale/state.ts on lines 1..16

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 126.

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 8 locations. Consider refactoring.
Open

angular.module("app").config($stateProvider =>
    $stateProvider.state("root.perusvalmistava.tekstikappale", {
        url: "/tekstikappale/:tekstikappaleId",
        templateUrl: "eperusteet-esitys/views/tekstikappale.html",
        controller: Controllers.epEsitysSisaltoController,
eperusteet-opintopolku-app/yo/app/states/esiopetus/tekstikappale/state.ts on lines 1..14
eperusteet-opintopolku-app/yo/app/states/lisaopetus/tekstikappale/state.ts on lines 1..16
eperusteet-opintopolku-app/yo/app/states/opas/tekstikappale/state.ts on lines 1..14
eperusteet-opintopolku-app/yo/app/states/tpo/taiteenala/state.ts on lines 1..14
eperusteet-opintopolku-app/yo/app/states/tpo/taiteenalaOsa/state.ts on lines 1..14
eperusteet-opintopolku-app/yo/app/states/tpo/tekstikappale/state.ts on lines 1..14
eperusteet-opintopolku-app/yo/app/states/varhaiskasvatus/tekstikappale/state.ts on lines 1..16

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 126.

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 8 locations. Consider refactoring.
Open

angular.module("app").config($stateProvider =>
    $stateProvider.state("root.tpo.taiteenalaOsa", {
        url: "/taiteenala/:tekstikappaleId/osa/:taiteenalaOsa",
        templateUrl: "views/tpo/taiteenalaOsa.html",
        controller: Controllers.epEsitysSisaltoController,
eperusteet-opintopolku-app/yo/app/states/esiopetus/tekstikappale/state.ts on lines 1..14
eperusteet-opintopolku-app/yo/app/states/lisaopetus/tekstikappale/state.ts on lines 1..16
eperusteet-opintopolku-app/yo/app/states/opas/tekstikappale/state.ts on lines 1..14
eperusteet-opintopolku-app/yo/app/states/perusvalmistava/tekstikappale/state.ts on lines 1..16
eperusteet-opintopolku-app/yo/app/states/tpo/taiteenala/state.ts on lines 1..14
eperusteet-opintopolku-app/yo/app/states/tpo/tekstikappale/state.ts on lines 1..14
eperusteet-opintopolku-app/yo/app/states/varhaiskasvatus/tekstikappale/state.ts on lines 1..16

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 126.

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

  @Getter(state => {
    if (!state.opetussuunnitelma || !state.navigation) {
      return null;
    }
    else {
Severity: Major
Found in src/stores/OpetussuunnitelmaDataStore.ts and 1 other location - About 4 hrs to fix
src/stores/ToteutussuunnitelmaDataStore.ts on lines 165..177

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 125.

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