From ce193e34d162ef5342bcef4d83ad9d46c4c4eb0d Mon Sep 17 00:00:00 2001 From: Yegor Bugayenko Date: Sat, 11 May 2024 03:50:45 -0400 Subject: [PATCH] #280 markdown check --- .github/workflows/markdown-lint.yml | 40 +++++++++++++++++ README.md | 69 ++++++++++++++++------------- 2 files changed, 79 insertions(+), 30 deletions(-) create mode 100644 .github/workflows/markdown-lint.yml diff --git a/.github/workflows/markdown-lint.yml b/.github/workflows/markdown-lint.yml new file mode 100644 index 0000000..47f24e5 --- /dev/null +++ b/.github/workflows/markdown-lint.yml @@ -0,0 +1,40 @@ +# The MIT License (MIT) +# +# Copyright (c) 2022-2024 Objectionary.com +# +# Permission is hereby granted, free of charge, to any person obtaining a copy +# of this software and associated documentation files (the "Software"), to deal +# in the Software without restriction, including without limitation the rights +# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +# copies of the Software, and to permit persons to whom the Software is +# furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included +# in all copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL THE +# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +# SOFTWARE. +--- +name: markdown-lint +'on': + push: + branches: + - master + pull_request: + branches: + - master + paths-ignore: ['paper/**', 'sandbox/**'] +concurrency: + group: markdown-lint-${{ github.ref }} + cancel-in-progress: true +jobs: + markdown-lint: + runs-on: ubuntu-22.04 + steps: + - uses: actions/checkout@v4 + - uses: articulate/actions-markdownlint@v1 diff --git a/README.md b/README.md index e12d43c..43ae4eb 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,6 @@ -logo +# EOLANG Command Line + +![eolang logo](https://www.objectionary.com/cactus.svg) [![EO principles respected here](https://www.elegantobjects.org/badge.svg)](https://www.elegantobjects.org) [![We recommend IntelliJ IDEA](https://www.elegantobjects.org/intellij-idea.svg)](https://www.jetbrains.com/idea/) @@ -9,19 +11,20 @@ [![Hits-of-Code](https://hitsofcode.com/github/objectionary/eoc)](https://hitsofcode.com/view/github/objectionary/eoc) [![License](https://img.shields.io/badge/license-MIT-green.svg)](https://github.com/objectionary/eoc/blob/master/LICENSE.txt) -First, you install [npm](https://docs.npmjs.com/downloading-and-installing-node-js-and-npm) +First, you install +[npm](https://docs.npmjs.com/downloading-and-installing-node-js-and-npm) and [Java SE](https://www.oracle.com/java/technologies/downloads/). Then, you install [eolang](https://www.npmjs.com/package/eolang) package: -``` -$ npm install -g eolang +```bash +npm install -g eolang ``` Then, you write a simple [EO](https://www.eolang.org) program in `hello.eo` file in the current directory: -``` +```eo [args] > hello QQ.io.stdout > @ "Hello, world!\n" @@ -29,8 +32,8 @@ in the current directory: Then, you run it: -``` -$ eoc dataize hello +```bash +eoc dataize hello ``` That's it. @@ -38,30 +41,34 @@ That's it. ## Commands You can also do many other things with `eoc` commands -(the flow is explained in [this blog post](https://www.yegor256.com/2021/10/21/objectionary.html)): - - * `register` finds necessary EO files and registers them in a JSON catalog - * `assemble` parses EO files into XMIR, optimizes them, and pulls foreign EO objects - * `transpile` converts XMIR to target programming language (Java by default) - * `compile` converts target language sources to binaries - * `link` puts all binaries together into a single executable binary - * `dataize` dataizes a single object from the executable binary - * `test` dataizes all visible unit tests +(the flow is explained in +[this blog post](https://www.yegor256.com/2021/10/21/objectionary.html)): + +* `register` finds necessary EO files and registers them in a JSON catalog +* `assemble` parses EO files into XMIR, optimizes them, + and pulls foreign EO objects +* `transpile` converts XMIR to target programming language (Java by default) +* `compile` converts target language sources to binaries +* `link` puts all binaries together into a single executable binary +* `dataize` dataizes a single object from the executable binary +* `test` dataizes all visible unit tests There are also commands that help manipulate with XMIR and EO sources (the list is not completed, while some of them are not implemented as of yet): - * `audit` inspects all required packages and reports their status - * `foreign` inspects all objects found in the program after `assemble` step - * `sodg` generates SODG from XMIR, further rederable as XML or [Dot](https://en.wikipedia.org/wiki/DOT_%28graph_description_language%29) - * `phi` generates PHI files from XMIR - * `unphi` generates XMIR files from PHI files - * `print` generates EO files from PHI files - * `translate` converts Java/C++/Python/etc. program to EO program - * `demu` removes `cage` and `memory` objects - * `dejump` removes `goto` objects - * `infer` suggests object names where it's possible to infer them - * `flatten` moves inner objects to upper level +* `audit` inspects all required packages and reports their status +* `foreign` inspects all objects found in the program after `assemble` step +* `sodg` generates SODG from XMIR, further rederable + as XML or + [Dot](https://en.wikipedia.org/wiki/DOT_%28graph_description_language%29) +* `phi` generates PHI files from XMIR +* `unphi` generates XMIR files from PHI files +* `print` generates EO files from PHI files +* `translate` converts Java/C++/Python/etc. program to EO program +* `demu` removes `cage` and `memory` objects +* `dejump` removes `goto` objects +* `infer` suggests object names where it's possible to infer them +* `flatten` moves inner objects to upper level This command line toolkit simply integrates other tools available in [@objectionary](https://github.com/objectionary) GitHub organization. @@ -72,8 +79,10 @@ First, run `npm install`. Then, run `grunt`. All tests should pass. If you want to run a single test: -``` -$ npm test -- test/test_mvnw.js +```bash +npm test -- test/test_mvnw.js ``` -Make your changes and then [make](https://www.yegor256.com/2014/04/15/github-guidelines.html) a pull request. +Make your changes and then +\[make](https://www.yegor256.com/2014/04/15/github-guidelines.html) +a pull request.