levi-leah / enki Goto Github PK
View Code? Open in Web Editor NEWCommand-line validation tool
License: MIT License
Command-line validation tool
License: MIT License
SSIA
I was unable to install pip
on RHEL 8.5.
I had to install pip2 and pip3 as Python packages. See
Installing additional Python3 packages
I then edited the install.sh file as per my latest release of pip:
!/bin/bash
path_to_script="$(realpath $(dirname "$0"))" enki=$path_to_script'/src/enki.py'
install dependencies pip3 install -qr $path_to_script'/requirements.txt'
sed -i "\|enki\.py|d" ~/.bashrc
echo 'alias enki="python3 '$enki'"' >> ~/.bashrc source ~/.bashrc
After these configurations, Enki validated my source files.
"ERROR: {nsbp} attribute ... " should no longer apply to local attr files
We added
:nbsp: ย
at the top of the global attr file instead.
The following needs to be checked:
AsciiDoctor 1.5.7 deprecated the footnoteref
macro. When run on the command line, asciidoctor
correctly prints a warning for it but as many writers rely on CI to build their content and rarely check the output log, this may slip their radar. I think it would be therefore beneficial for enki
to report deprecated markup so that writers have time to remove footnoteref
from their modules before AsciiDoctor stops supporting it completely.
This test has a bug and returns inconsistent results.
Levi confirmed to improve it
found a bug in ERROR: No empty line after the include statement found in the following files:
reports commented-out includes , like in rhel-8/modules/filesystems-and-storage/proc_increasing-the-size-of-an-xfs-file-system-with-xfs_growfs.adoc
ERROR: files contain UI macros but the :experimental: tag not found in the following files:
rhel-8/assemblies/assembly_customizing-the-boot-menu.adoc
I see nothing there :X
$ enki validate --links rhel-9/modules/identity-management/
/usr/share/gems/gems/asciidoctor-2.0.17/lib/asciidoctor/convert.rb:190:in `initialize': No such file or directory @ rb_sysopen - (Errno::ENOENT)
from /usr/share/gems/gems/asciidoctor-2.0.17/lib/asciidoctor/convert.rb:190:in `open'
from /usr/share/gems/gems/asciidoctor-2.0.17/lib/asciidoctor/convert.rb:190:in `convert_file'
from /home/jhradilek/Downloads/Sources/enki/src/lcheck.rb:30:in `block in return_broken_links'
from /home/jhradilek/Downloads/Sources/enki/src/lcheck.rb:28:in `each'
from /home/jhradilek/Downloads/Sources/enki/src/lcheck.rb:28:in `return_broken_links'
from /home/jhradilek/Downloads/Sources/enki/src/lcheck.rb:123:in `<main>'
For entries in the common content attribute file, the actual docs should be using them.
We need a test locating string that should be defined as inline attributes but are not.
The following needs to be checked:
Enki seems to list one file as many times as the problem occurs in it. Since it currently does not have ability to display line numbers, where this behavior would be justified, it would be better to only list the file once.
The following is the output with the latest version of enki from main
:
$ enki validate proc_configuring-automount-in-idm.adoc
ERROR: No empty line after the include statement found in the following files:
proc_configuring-automount-in-idm.adoc
ERROR: Nesting in modules found in the following files:
proc_configuring-automount-in-idm.adoc
proc_configuring-automount-in-idm.adoc
proc_configuring-automount-in-idm.adoc
Expected output:
$ enki validate proc_configuring-automount-in-idm.adoc
ERROR: No empty line after the include statement found in the following files:
proc_configuring-automount-in-idm.adoc
ERROR: Nesting in modules found in the following files:
proc_configuring-automount-in-idm.adoc
ERROR: toc attribute found in the following files:
ERROR: {nsbp}
attribute is used but not defined. :nbsp:  
attribute is not found in the following files:
See issue #1
ERROR: HTML markup found in the following files:
Thus far does not report anything ilegitimate - might need some refining if HTML snippets need a wrapper or something
ERROR: empty line after the abstract tag found in the following files:
ERROR: empty line before the abstract tag not found in the following files:
ERROR: an empty line after the additional resources header was found in the following files:
ERROR: an empty line after the additional resources tag was found in the following files:
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.