Skip to content

Commit

Permalink
#280 markdown check
Browse files Browse the repository at this point in the history
  • Loading branch information
yegor256 committed May 11, 2024
1 parent 6282092 commit ce193e3
Show file tree
Hide file tree
Showing 2 changed files with 79 additions and 30 deletions.
40 changes: 40 additions & 0 deletions .github/workflows/markdown-lint.yml
Original file line number Diff line number Diff line change
@@ -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
69 changes: 39 additions & 30 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
<img alt="logo" src="https://www.objectionary.com/cactus.svg" height="92px" />
# 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/)
Expand All @@ -9,59 +11,64 @@
[![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"
```

Then, you run it:

```
$ eoc dataize hello
```bash
eoc dataize hello
```

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

Check failure on line 56 in README.md

View workflow job for this annotation

GitHub Actions / markdown-lint

Trailing spaces [Expected: 0 or 2; Actual: 1]
(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
* <del>`translate` converts Java/C++/Python/etc. program to EO program</del>
* <del>`demu` removes `cage` and `memory` objects</del>
* <del>`dejump` removes `goto` objects</del>
* <del>`infer` suggests object names where it's possible to infer them</del>
* <del>`flatten` moves inner objects to upper level</del>
* `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
* <del>`translate` converts Java/C++/Python/etc. program to EO program</del>

Check failure on line 67 in README.md

View workflow job for this annotation

GitHub Actions / markdown-lint

Inline HTML [Element: del]
* <del>`demu` removes `cage` and `memory` objects</del>

Check failure on line 68 in README.md

View workflow job for this annotation

GitHub Actions / markdown-lint

Inline HTML [Element: del]
* <del>`dejump` removes `goto` objects</del>

Check failure on line 69 in README.md

View workflow job for this annotation

GitHub Actions / markdown-lint

Inline HTML [Element: del]
* <del>`infer` suggests object names where it's possible to infer them</del>
* <del>`flatten` moves inner objects to upper level</del>

This command line toolkit simply integrates other tools available in
[@objectionary](https://github.com/objectionary) GitHub organization.
Expand All @@ -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.

0 comments on commit ce193e3

Please sign in to comment.