codelicia/xulieta-php-lp 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

codelicia/xulieta-php-lp

Composer 安装命令:

composer require codelicia/xulieta-php-lp

包简介

Xulieta Plugin for supporting of Literate programming

README 文档

README

Warning This library is highly experimental.

🤓 Literate programming?

Literate programming is a programming paradigm introduced by Donald Knuth in which a computer program is given an explanation of its logic in a natural language, such as English, interspersed with snippets of macros and traditional source code, from which compilable source code can be generated. The approach is used in scientific computing and in data science routinely for reproducible research and open access purposes. Literate programming tools are used by millions of programmers today.

Note This library will lint and run php code, be careful with side-effects.

Installation

composer require codelicia/xulieta-lp --dev

Checking for errors

In order to lint the basics of documentation structure, one just needs to provide a path for a directory or file to be linted.

./vendor/bin/xulieta check:erromeu <directory>

Integration with GitHub Actions

We provide out of the box an output format that you can use to have automatic feedback from GitHub CI. That is done by specifying the checkstyle output and passing it to some external binary that does the commenting.

We recommend the usage of cs2pr.

./vendor/bin/xulieta check:erromeu <directory> --output=checkstyle | cs2pr

Advanced Configuration

In order to enable it, you should configure the .xulieta.xml with the following parser and validator:

<?xml version="1.0" encoding="UTF-8" ?>
<xulieta xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
        xsi:noNamespaceSchemaLocation="./vendor/codelicia/xulieta/xulieta.xsd">

   <parser>Codelicia\XulietaPhpLP\Parser\MarkdownParser</parser>
   <validator>Codelicia\XulietaPhpLP\LiterateProgramming</validator>

</xulieta>

Internals

Click to see the internal diagram
classDiagram
direction BT
class CodeRunner {
   __invoke(code)
}
class EvalStrategy {
   __invoke(code)
}
class LiterateProgramming {
   getViolation(sampleCode)
   supports(sampleCode)
   hasViolation(sampleCode)
}
class MarkdownParser {
   supportedExtensions()
   supports(file)
   getAllSampleCodes(file)
}
class Strategy {
   __invoke(code)
}
class TemporaryFileStrategy {
   __invoke(code)
}
class Validator {
   getViolation(sampleCode)
   supports(sampleCode)
   hasViolation(sampleCode)
}

EvalStrategy  ..>  Strategy
LiterateProgramming  ..>  Validator
TemporaryFileStrategy  ..>  Strategy
Loading

Author 🎩✨

  • malukenho (@malukenho)
  • Eher (@EHER)

统计信息

  • 总下载量: 32
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 1

GitHub 信息

  • Stars: 0
  • Watchers: 3
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2022-02-03

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固