Skip to content

Instantly share code, notes, and snippets.

View danpoltawski's full-sized avatar

Dan Poltawski danpoltawski

View GitHub Profile

Eslint results on 3671ebed151

Core AMD modules

✘ 248 problems (0 errors, 248 warnings)

$ eslint --format 'node_modules/eslint-friendly-formatter' */**/amd/src/*
[...]
@danpoltawski
danpoltawski / gist:32e17a478e2c9f739ceb5bf724ba898f
Created May 13, 2016 17:33
Moodle 3.1beta+ (Build: 20160513), 65cbefc403f3bcaeec35d45f98610c39c460007a Php: 5.6.20, Oracle: 11.2.0.2.0, OS: Darwin 15.4.0 x86_64
Moodle 3.1beta+ (Build: 20160513), 65cbefc403f3bcaeec35d45f98610c39c460007a
Php: 5.6.20, Oracle: 11.2.0.2.0, OS: Darwin 15.4.0 x86_64
PHPUnit 4.8.24 by Sebastian Bergmann and contributors.
............................................................. 61 / 5884 ( 1%)
............................................................. 122 / 5884 ( 2%)
............................................................. 183 / 5884 ( 3%)
............................................................. 244 / 5884 ( 4%)
............................................................. 305 / 5884 ( 5%)
............................................................. 366 / 5884 ( 6%)
@danpoltawski
danpoltawski / gist:c80d4f0d6dd8cf42f21a1ef13fedecc0
Last active May 11, 2016 22:36
eslint ignores for entire codebase run
diff --git a/.eslintignore b/.eslintignore
index a682167..0e1ed1a 100644
--- a/.eslintignore
+++ b/.eslintignore
@@ -4,3 +4,13 @@ lib/amd/src/loglevel.js
lib/editor/atto/yui/src/rangy/
**/yui/src/*/meta/*.js
lib/yui/src/notification/js/shared.js
+**/yui/build/*
+**/yuilib/*
@danpoltawski
danpoltawski / gist:50c6fb2934f2e32482d4
Last active November 26, 2015 09:20
PHP 7.0.0RC7 moodle phpunit on wip-php7' of https://github.com/marinaglancy/moodle
Time: 10.07 minutes, Memory: 284.00Mb
There were 10 errors:
1) core_test_generator_testcase::test_create_module
Declaration of core\plugininfo\calendartype::load_settings(core\plugininfo\part_of_admin_tree $adminroot, $parentnodename, $hassiteconfig) should be compatible with core\plugininfo\base::load_settings(part_of_admin_tree $adminroot, $parentnodename, $hassiteconfig)
/Users/danp/moodles/im/moodle/lib/classes/plugininfo/calendartype.php:72
/Users/danp/moodles/im/moodle/lib/classes/component.php:96
/Users/danp/moodles/im/moodle/lib/classes/component.php:96
Running "jshint:files" (jshint) task
blocks/navigation/yui/src/navigation/js/navigation.js
203 |var TREE = function() {
^ 'TREE' was used before it was defined.
436 |var BRANCH = function() {
^ 'BRANCH' was used before it was defined.
course/yui/src/categoryexpander/js/categoryexpander.js
16 |var CSS = {
^ Redefinition of 'CSS'.
@danpoltawski
danpoltawski / gist:fb328a725d75f5b22b77
Created October 13, 2015 13:30
fix xmlrpc webservices and debugging
diff --git a/group/externallib.php b/group/externallib.php
index d7a5a07..b530283 100644
--- a/group/externallib.php
+++ b/group/externallib.php
@@ -1310,7 +1310,7 @@ class core_group_external extends external_api {
return new external_function_parameters(
array(
'cmid' => new external_value(PARAM_INT, 'course module id'),
- 'userid' => new external_value(PARAM_INT, 'id of user, empty for current user', VALUE_OPTIONAL, 0)
+ 'userid' => new external_value(PARAM_INT, 'id of user, empty for current user', VALUE_DEFAULT, 0)
@danpoltawski
danpoltawski / gist:c25c1ebab892622516c8
Created October 13, 2015 13:30
fix xmlrpc webservices and debugging
diff --git a/group/externallib.php b/group/externallib.php
index d7a5a07..b530283 100644
--- a/group/externallib.php
+++ b/group/externallib.php
@@ -1310,7 +1310,7 @@ class core_group_external extends external_api {
return new external_function_parameters(
array(
'cmid' => new external_value(PARAM_INT, 'course module id'),
- 'userid' => new external_value(PARAM_INT, 'id of user, empty for current user', VALUE_OPTIONAL, 0)
+ 'userid' => new external_value(PARAM_INT, 'id of user, empty for current user', VALUE_DEFAULT, 0)
@danpoltawski
danpoltawski / gist:0bba60109e3938d1585a
Created July 21, 2015 08:57
Should iRun Lines of code
cloc .
273 text files.
260 unique files.
97 files ignored.
http://cloc.sourceforge.net v 1.64 T=0.95 s (188.9 files/s, 21649.3 lines/s)
-------------------------------------------------------------------------------
Language files blank comment code
-------------------------------------------------------------------------------
Objective C 71 3588 1071 10314
danp@lisa:~/www/im (master)$ git reset --hard origin/master
HEAD is now at 7ab171f Merge branch 'wip-MDL-49742-master' of git://github.com/abgreeve/moodle
(reverse-i-search)`grunt': grunt
danp@lisa:~/www/im (master)$ rm theme/bootstrapbase/amd/build/bootstrap.min.js
danp@lisa:~/www/im (master *)$ grunt
Running "startup" task
Running "shifter" task
shifter [info] racing to find the closest .shifter.json file
shifter [info] woohoo, found a config here: /Users/danp/moodles/im/moodle/.shifter.json
find . -name *.css ! -path '*/vendor/*' ! -path '*/lib/yuilib/*' ! -path '*/lib/*' ! -path '*/bootstrapbase/style/*' -exec csslint --errors=display-property-grouping,duplicate-properties,empty-rules,errors,known-properties --format=compact {} \; | grep -v 'Lint Free!'
/Users/danp/moodles/im/moodle/blocks/community/styles.css: line 10, col 1, Error - Rule is empty.
/Users/danp/moodles/im/moodle/blocks/community/styles.css: line 15, col 1, Error - Rule is empty.
/Users/danp/moodles/im/moodle/blocks/community/styles.css: line 17, col 1, Error - Rule is empty.
/Users/danp/moodles/im/moodle/blocks/community/styles.css: line 28, col 1, Error - Rule is empty.
/Users/danp/moodles/im/moodle/blocks/community/styles.css: line 70, col 5, Error - Duplicate property 'color' found.
/Users/danp/moodles/im/moodle/blocks/community/styles.css: line 157, col 1, Error - Rule is empty.
/Users/danp/moodles/im/moodle/blocks/navigation/styles.css: line 46, col 91, Error - Duplicate property 'padding-left' found.