Coder Social home page Coder Social logo

awesomecodefixer's Introduction

AwesomeCodeFixer

Celem projektu jest stworzenie narzędzia do formatowania i lintowania pliku o własnym formacie, w którego skład wchodzi:

  • markdown
  • inline/block latex
  • code block (aktualnie wspierane - C, C++, Python, Sql)

Narzędzie posiada 2 endpointy:

  • format - przyjmuje treść artykułu, a na wyjście przesyła sformatowany tekst
  • lint - przyjmuje treść artykułu, a na wyjście przesyła listę błędów/warning'ów

Wykorzystane narzędzia

Język implementacji: C#.

Installation

  1. Clone project
  2. Install latest Node.js
  3. Install Linux distro (developed with Ubuntu) on WSL
  4. Create venv for python in the root of repository and activate it

Note: Add path to your current node version bin folder to .bashrc, e.g.

export PATH="$PATH:/home/bartex/.nvm/versions/node/v20.13.1/bin/"

Note: Below operations perform in repository root directory with activated venv.

Important: Remember to alter paths to tools in Formatter.cs and Linter.cs.

Install Linters

npm install --save-dev [email protected]
npm install markdownlint-cli --save-dev
npm install eslint @babel/core @babel/eslint-parser --save-dev
pip install cpplint
pip install sqlfluff
pip install flake8
sudo apt install chktex

Install Formatters

npm install --save-dev --save-exact prettier
npm install --save-dev prettier-plugin-latex
npm install --save-dev prettier-plugin-sql
pip install black
pip install clang-format

Tools usage reference

Running linters:

npx eslint --stdin --stdin-filename=foo.md
chktex
clang-format --dry-run --Werror --assume-filename=.c
clang-format --dry-run --Werror --assume-filename=.cpp
sqlfluff lint - --dialect ansi
flake8 -

Running formatters:

prettier --stdin-filepath foo.xxx
black -
clang-format --assume-filename=<string> 

Contribution

  • Bartosz Warchoł
  • Radosław Myśliwiec
  • Gabriela Żmuda

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.