smss-dev / moodle-local_artena

Moodle local plugin to support an interface with the Artena SMS
2 stars 3 forks source link

code does not comply well with Moodle coding guidelines. #4

Open danmarsden opened 8 years ago

danmarsden commented 8 years ago

There are a number of coding guideline violations within the code - it would be nice if it could be tidied up a bit - there are a few different tools for this but the best is probably travis-ci integration within github.

to do this you will need to move theplugin files in your github repository into the root directory (instead of inside the "local/artena" folder, drop in the travis.yml template configuration file, login to travis-ci.org and enable travis-ci on this github repository. More info on this is here: https://moodle.org/mod/forum/discuss.php?d=323384

danmarsden commented 8 years ago

alternatively you can also use the local_codechecker plugin to manually run checks on your code.

troywilliams commented 7 years ago

To move the project to the root directory as per Moodle guidelines you can do this:

# Replace with your repository.
git clone git@github.com:troywilliams/moodle-local_artena.git moodle-local_artena
cd moodle-local_artena

# Make a backup of master branch,
git checkout -b backup-master master
git push origin backup-master

# Change default branch backup-master.
# On GitHub
Go to "Settings" > "Branches"
Set default branch to "backup-master"

# Move project to root directory.
git checkout master
git filter-branch -f --subdirectory-filter local/artena -- master
git push origin --delete master
git push -u origin master

# Change default branch back to master.
# On GitHub
Go to "Settings" > "Branches"
Set default branch to "master"
Add "master" as a protected branch.

# Remove backup.
git push origin --delete backup-master

You can view result at: https://github.com/troywilliams/moodle-local_artena

Cheers