/
Setting Up a Git Pre-Commit Hook to Parse KRL

Setting Up a Git Pre-Commit Hook to Parse KRL

Automatically parsing your KRL before committing will save you a lot of frustration. 

For more information see Programming Workflow

Step-by-step guide

Here's what you need to do:

  1. Install the KRL Compiler using this command:
    1. npm install -g krl-compiler
    2. ensure that its version is at or beyond krl-compiler@1.0.1
    3. if you have an older version, use this command: npm update -g krl-compiler
  2. Create your git repository
  3. Navigate to <repository>/.git/hooks
  4. Install the pre-commit shell script from the Programming Tools GitHub repository by placing it in that directory; be sure it's executable

Now, when you commit KRL files, they will be parsed and the commit will fail if they do not parse successfully. 

Related content

Conditional Expressions
Conditional Expressions
Read with this
Programming Workflow
Programming Workflow
More like this
Developer Tips for Pico Engine
Developer Tips for Pico Engine
Read with this
Atom Editor with KRL
Atom Editor with KRL
More like this
Events and Queries Lesson
Events and Queries Lesson
Read with this
KRL Programming Tools
KRL Programming Tools
More like this

Copyright Picolabs | Licensed under Creative Commons.