Skip to main content

A Linter for JHU's Assembly Classes

Project description

Assembly Style Linter

This linter was designed with Prof. Charles Kann's Computer Organization (EN.605.204) course in mind. It performs a strict but non-exhaustive lint; meaning it will not catch all errors but will be noisy and exacting about those that it does.

Install

pip install jhu-assembly-linter

Usage

$ jhu-assembly-linter ./path/to/file.s

E:: Tab found. Only spaces allowed.
18:     LDR x0, =helloWorld
    ^
E:: Instruction is not uppercase.
19:     mov     w8, #64     /* write is syscall #64 */
        ^
E:: Non-functional whitespace found.
20: 
    ^^^^^
E:: File name does not end with "Main" when it should.
21: main:

To lint a whole directory:

find . -name "*.s" | xargs -I{} jhu-assembly-linter  {}

To add a pre-commit hook to you repo:

repos:
-   repo: https://github.com/LogstonGradSchool/JhuAssemblyStyleLinter
    rev: <latest version>
    hooks:
    -   id: jhu-assembly-linter

Tests

tox

Deployment

poetry build
poetry publish

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

jhu_assembly_linter-0.1.7.tar.gz (4.6 kB view hashes)

Uploaded Source

Built Distribution

jhu_assembly_linter-0.1.7-py3-none-any.whl (5.5 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page