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 details)

Uploaded Source

Built Distribution

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

Uploaded Python 3

File details

Details for the file jhu_assembly_linter-0.1.7.tar.gz.

File metadata

  • Download URL: jhu_assembly_linter-0.1.7.tar.gz
  • Upload date:
  • Size: 4.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.5.1 CPython/3.11.1 Darwin/22.5.0

File hashes

Hashes for jhu_assembly_linter-0.1.7.tar.gz
Algorithm Hash digest
SHA256 be158a9942ee6836bf0730dde31b473a636b03d9e0780b95d584acd677424b7d
MD5 8bc21a9415f648808b4aba1f5d29e969
BLAKE2b-256 1f08f2124eeca5fff66d4e7a4ed881fb5f863eed15226fdf5d46c4ec0f20061a

See more details on using hashes here.

File details

Details for the file jhu_assembly_linter-0.1.7-py3-none-any.whl.

File metadata

File hashes

Hashes for jhu_assembly_linter-0.1.7-py3-none-any.whl
Algorithm Hash digest
SHA256 870fb5b559568ad1a2a87ce5afcd568d8b9b01d4049a100aac7492e6bed55608
MD5 5c9fe91640916d1ad2a7df764c4c9f78
BLAKE2b-256 8fd8853d65eb7a6f090c522c57302f60faebc732fee5b01f5f783f109bfaeda6

See more details on using hashes here.

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