Skip to content

Simple collection of scripts in multiple languages to remove trailing newlines and comments

Notifications You must be signed in to change notification settings

ptr-dodge/format

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ade9aeb · Jan 6, 2024

History

11 Commits
Jan 6, 2024
Jan 3, 2024
Jan 6, 2024
Jan 3, 2024
Jan 6, 2024

Repository files navigation

Format

Remove comments and trailing newlines

Single line comments:

  • #

  • '

  • //

  • """

  • '''

  • rem

  • --

  • ;

Multiline comments:

  • /* ... */

  • <-- ... -->

  • (* ... *)

  • ''' ... '''

  • """ ... """

Clone the repo:

git clone https://github.com/ptr-dodge/format.git

Alternativley, (personally preferred)


gh repo clone ptr-dodge/format

Bash

Use the bash script

chmod +x ./format.sh
./format.sh file_to_format

Python

Use the python script

python format.py file_to_format

Powershell

Use the powershell script

./format.ps1 file_to_format

Lua

Use the lua script

lua format.lua file_to_format

Todo: add command to add to path

About

Simple collection of scripts in multiple languages to remove trailing newlines and comments

Topics

Resources

Stars

Watchers

Forks