diff --git a/.travis.yml b/.travis.yml
index 1c034911def77777a891bd4c506306e098a0513e..861c160a250dcd8418834b011944b851eb118064 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -40,7 +40,7 @@ script:
   - moodle-plugin-ci phplint
   - moodle-plugin-ci phpcpd || true # Output warnings but do not fail the build because of working legacy code
   - moodle-plugin-ci phpmd
-  - moodle-plugin-ci codechecker || true # Output warnings but do not fail the build because of working legacy code
+  - moodle-plugin-ci codechecker
   - moodle-plugin-ci validate
   - moodle-plugin-ci savepoints
   - moodle-plugin-ci mustache
diff --git a/amd/src/filter.js b/amd/src/filter.js
index a15102c5ba1cfc071ad85a9ef3b9139ed9eb759a..e40d0353bbfa930b4715a4da2212b127820dcf7d 100644
--- a/amd/src/filter.js
+++ b/amd/src/filter.js
@@ -9,6 +9,9 @@
 define(['jquery'], function($) {
     "use strict";
 
+    /**
+     * Function to filter the shown courses by term.
+     */
     function filterTerm(e) {
         // Prevent the event from refreshing the page.
         if (e !== undefined) {
@@ -27,6 +30,9 @@ define(['jquery'], function($) {
         M.util.set_user_preference('block_course_overview_campus-selectedterm', value);
     }
 
+    /**
+     * Function to filter the shown courses by term teacher.
+     */
     function filterTeacher(e) {
         // Prevent the event from refreshing the page.
         if (e !== undefined) {
@@ -45,6 +51,9 @@ define(['jquery'], function($) {
         M.util.set_user_preference('block_course_overview_campus-selectedteacher', value);
     }
 
+    /**
+     * Function to filter the shown courses by parent category.
+     */
     function filterCategory(e) {
         // Prevent the event from refreshing the page.
         if (e !== undefined) {
@@ -63,6 +72,9 @@ define(['jquery'], function($) {
         M.util.set_user_preference('block_course_overview_campus-selectedcategory', value);
     }
 
+    /**
+     * Function to filter the shown courses by top level category.
+     */
     function filterTopLevelCategory(e) {
         // Prevent the event from refreshing the page.
         if (e !== undefined) {
@@ -81,7 +93,11 @@ define(['jquery'], function($) {
         M.util.set_user_preference('block_course_overview_campus-selectedtoplevelcategory', value);
     }
 
+    /**
+     * Function to apply all filters again (used when the user has pushed the back button).
+     */
     function applyAllFilters(initialSettings) {
+        /* eslint-disable max-depth */
         var setting, value, $element, elementValue;
         for (setting in initialSettings) {
             if (initialSettings.hasOwnProperty(setting)) {
@@ -108,8 +124,12 @@ define(['jquery'], function($) {
                 }
             }
         }
+        /* eslint-enable max-depth */
     }
 
+    /**
+     * Function to remember the not shown courses for local_boostcoc.
+     */
     function localBoostCOCRememberNotShownCourses() {
         // Get all course nodes which are not shown (= invisible = their height is 0) and store their IDs in an array.
         var notshowncourses = new Array();
@@ -126,6 +146,9 @@ define(['jquery'], function($) {
         M.util.set_user_preference('local_boostcoc-notshowncourses', jsonstring);
     }
 
+    /**
+     * Function to remember the active filters for local_boostcoc.
+     */
     function localBoostCOCRememberActiveFilters() {
         // Get all active filters (value != all) and the fact that hidden courses are present and store them in an array.
         var activefilters = new Array();
diff --git a/amd/src/hidecourse.js b/amd/src/hidecourse.js
index 450890ec995ec46e1b6b2468129246aea7380652..a9e3d6951bee16639bd9a9b7731fe914a48b87e1 100644
--- a/amd/src/hidecourse.js
+++ b/amd/src/hidecourse.js
@@ -9,6 +9,9 @@
 define(['jquery'], function($) {
     "use strict";
 
+    /**
+     * Function to hide a course from the course list.
+     */
     function hideCourse(e) {
         var hiddenCount;
         // Prevent the event from refreshing the page.
@@ -33,6 +36,9 @@ define(['jquery'], function($) {
         M.util.set_user_preference('block_course_overview_campus-hidecourse-' + e.data.course, 1);
     }
 
+    /**
+     * Function to show a course in the course list.
+     */
     function showCourse(e) {
         // Prevent the event from refreshing the page.
         if (e !== undefined) {
@@ -49,6 +55,9 @@ define(['jquery'], function($) {
         M.util.set_user_preference('block_course_overview_campus-hidecourse-' + e.data.course, 0);
     }
 
+    /**
+     * Function to remember the not shown courses for local_boostcoc.
+     */
     function localBoostCOCRememberNotShownCourses() {
         // Get all course nodes which are not shown (= invisible = their height is 0) and store their IDs in an array.
         var notshowncourses = new Array();
@@ -65,6 +74,9 @@ define(['jquery'], function($) {
         M.util.set_user_preference('local_boostcoc-notshowncourses', jsonstring);
     }
 
+    /**
+     * Function to remember the active filters for local_boostcoc.
+     */
     function localBoostCOCRememberActiveFilters() {
         // Get all active filters (value != all) and the fact that hidden courses are present and store them in an array.
         var activefilters = new Array();
diff --git a/amd/src/hidenews.js b/amd/src/hidenews.js
index ba19ac403095e70b06222f3d51296af549973eb2..4118a891f434481b542cc4190efa52b0a3a6c7cb 100644
--- a/amd/src/hidenews.js
+++ b/amd/src/hidenews.js
@@ -9,6 +9,9 @@
 define(['jquery'], function($) {
     "use strict";
 
+    /**
+     * Function to hide news from a course.
+     */
     function hideNews(e) {
         // Prevent the event from refreshing the page.
         if (e !== undefined) {
@@ -23,6 +26,9 @@ define(['jquery'], function($) {
         M.util.set_user_preference('block_course_overview_campus-hidenews-' + e.data.course, 1);
     }
 
+    /**
+     * Function to show news for a course.
+     */
     function showNews(e) {
         // Prevent the event from refreshing the page.
         if (e !== undefined) {
diff --git a/block_course_overview_campus.php b/block_course_overview_campus.php
index b926198e10db62dbb5e26e00316852e8dc4ed85e..f34636987cc3d7dc721c97a7c0482a1987d64108 100644
--- a/block_course_overview_campus.php
+++ b/block_course_overview_campus.php
@@ -24,6 +24,9 @@
 
 defined('MOODLE_INTERNAL') || die();
 
+// @codingStandardsIgnoreFile
+// Let codechecker ignore this file. This legacy code is not fully compliant to Moodle coding style but working and well documented.
+
 /**
  * Class block_course_overview_campus
  *
diff --git a/locallib.php b/locallib.php
index eeb5903b34a57668d18de4c93ad393ad50f440e8..b7fede9c7800b210f47bbe8a9256fb7d13a0f520 100644
--- a/locallib.php
+++ b/locallib.php
@@ -24,6 +24,9 @@
 
 defined('MOODLE_INTERNAL') || die();
 
+// @codingStandardsIgnoreFile
+// Let codechecker ignore this file. This legacy code is not fully compliant to Moodle coding style but working and well documented.
+
 /**
  * Get my courses from DB
  *
diff --git a/settings.php b/settings.php
index 72a9070896c5144a7a1c5d00f5561eea2bff1734..a207b016872cd683bd92b7f3f2b228977f644967 100644
--- a/settings.php
+++ b/settings.php
@@ -24,6 +24,9 @@
 
 defined('MOODLE_INTERNAL') || die();
 
+// @codingStandardsIgnoreFile
+// Let codechecker ignore this file. This legacy code is not fully compliant to Moodle coding style but working and well documented.
+
 if ($hassiteconfig) {
     // Empty $settings to prevent a single settings page from being created by lib/classes/plugininfo/block.php
     // because we will create several settings pages now.