Skip to content

ianlewis/1337

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

30 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

1337 Code

tests OpenSSF Scorecard

This repository contains various LEET (1337) code examples and solutions to coding problems, challenges, and algorithms. The goal is to provide a collection of well-documented and efficient code snippets that can be used as references.

Contents

Makefile

The Makefile is used for managing files and maintaining code quality. It includes a default help target that prints all make targets and their descriptions grouped by function.

1337$ make
1337 Makefile
Usage: make [COMMAND]

  help                      Print all Makefile targets (this message).
Tests
  unit-tests                Run unit tests.
  integration-tests         Run integration tests.
Tools
  license-headers           Update license headers.
Formatting
  format                    Format all files
  go-format                 Format Go files.
  js-format                 Format YAML files.
  json-format               Format JSON files.
  md-format                 Format Markdown files.
  rust-format               Runs rustfmt.
  ts-format                 Format YAML files.
  yaml-format               Format YAML files.
Linting
  lint                      Run all linters.
  actionlint                Runs the actionlint linter.
  fixme                     Check for outstanding FIXMEs.
  golangci-lint             Runs golangci-lint linter.
  markdownlint              Runs the markdownlint linter.
  renovate-config-validator Validate Renovate configuration.
  textlint                  Runs the textlint linter.
  yamllint                  Runs the yamllint linter.
  zizmor                    Runs the zizmor linter.
Maintenance
  todos                     Check for outstanding TODOs.
  clean                     Delete temporary files.

Formatting and linting

Some Makefile targets for basic formatters and linters are included along with GitHub Actions pre-submits. Versioning of these tools is done via the requirements.txt and packages.json. This is so that the versions can be maintained and updated via dependabot-like tooling.

Required runtimes:

  • node: Node.js is required to run some linters and formatters.
  • python: Node.js is required to run some linters and formatters.

The following tools need to be installed:

  • actionlint: For linting GitHub Actions workflows.
  • shellcheck: For linting shell code in GitHub Actions workflows.

The following tools are installed locally:

  • yamllint: For YAML (e.g. GitHub Actions workflows). (installed in Python virtualenv .venv).
  • prettier: For formatting markdown and YAML (installed in local node_modules).
  • markdownlint: For linting markdown (installed in local node_modules).

Makefile targets and linter/formatter configuration are designed to respect .gitignore and not cross git submodules boundaries. However, you will need to add files using git add for new files before they are picked up.

Makefile targets for linters will also produce human-readable output by default, but will produce errors as GitHub Actions workflow commands so they can be easily interpreted when run in Pull-Request status checks.

Contributing

See CONTRIBUTING.md for contributor documentation.

About

Coding solutions to various problems, challenges, and algorithms

Resources

License

Code of conduct

Contributing

Security policy

Stars

Watchers

Forks

Contributors 3

  •  
  •  
  •