高级Bitbake配方皮棉

oelint_adv的Python项目详细描述


高级oelint

目的

基于OpenEmbedded Styleguide和工作 完成人 oe-stylize-tool 这个模块提供了一个(几乎)完整的皮棉烘烤食谱。

该工具确实会自动处理includes/requires,因此您没有 通过cli传递它们。

注意:.bbappend文件必须通过cli传递-这些文件不是 自动收集

用法

oelint-adv
usage: __main__.py [-h] [--suppress SUPPRESS] [--output OUTPUT] [--fix]
                   [--nobackup]
                   files [files ...]

Advanced OELint - Check bitbake recipes against OECore styleguide

positional arguments:
  files                File to parse

optional arguments:
  -h, --help           show this help message and exit
  --suppress SUPPRESS  Rules to suppress
  --output OUTPUT      Where to flush the findings (default: stderr)
  --fix                Automatically try to fix the issues
  --nobackup           Don't create backup file when auto fixing

输出

将是[文件]:[行]:[严重性]:[消息]。

示例:

/disk/meta-some/cppcheck-native/cppcheck.inc:26:error:oelint.task.nomkdir:'mkdir' shall not be used in do_install. Use 'install'
/disk/meta-some/cppcheck-native/cppcheck-native_1.87.bb:0:error:oelint.var.mandatoryvar:Variable 'SECTION' should be set
/disk/meta-some/cppcheck-native/cppcheck.inc:1:warning:oelint.vars.summary80chars:'SUMMARY' should not be longer than 80 characters
/disk/meta-some/cppcheck-native/cppcheck.inc:4:warning:oelint.vars.homepageprefix:'HOMEPAGE' should start with 'http://' or 'https://'
/disk/meta-some/cppcheck-native/cppcheck.inc:28:warning:oelint.spaces.lineend:Line shall not end with a space
/disk/meta-some/cppcheck-native/cppcheck-native_1.87.bb:0:error:oelint.var.mandatoryvar:Variable 'AUTHOR' should be set
/disk/meta-some/cppcheck-native/cppcheck.inc:26:error:oelint.task.nocopy:'cp' shall not be used in do_install. Use 'install'
/disk/meta-some/cppcheck-native/cppcheck.inc:12:warning:oelint.var.order:'DEPENDS' should be placed before 'inherit'
< H2>应用自动固定< /H2> 有些规则能够自动修复发现的问题。 如果将–fix作为启动参数传递,则将完成此操作。

只要不传递–nobackup备份副本(filename+.bak) 将为所有已修复的文件创建。

可用规则

标记为“1”的规则可以执行自动修复< > >
  • oelint.comments.no trailing-不允许尾随注释,注释 应该在一条线上
  • oelint.file.patchSignedOff-修补程序应包含签名者 条目
  • oelint.file.upstream status-修补程序应包含上游状态 条目
  • oelint.spaces.empty line-空行不应包含空格或 标签页[f]
  • oelint.spaces.linebeging-行首没有空格[f]
  • oelint.spaces.linecont-安全行继续[f]
  • oelint.spaces.line end-行尾没有空格[f]
  • oelint.tabs.notabs-不允许使用制表符[f]
  • oelint.task.addnotaskbody-找不到addtask添加的任务
  • oelint.task.custom order-通过addtask添加的自定义任务的顺序
  • oelint.task.docstrings-自定义任务应具有docstrings
  • oelint.task.multiappends-中同一函数的多个appends 同一文件在BitBake中不起作用
  • oelint.task.nocopy-do_install中没有cp用法
  • oelint.task.no mkdir-在do_安装中不使用mkdir
  • oelint.task.order-任务顺序
  • oelint.var.bbclassextend-尽可能使用bbclassextend
  • oelint.vars.dependsappend-depends只应追加,而不应追加 覆盖
  • oelint.var.licensemotefile-许可证应为远程文件 source不是本地文件
  • oelint.var.mandatoryvar-检查强制变量
  • oelint.var.multiinclude-包含同一文件超过 一次
  • oelint.var.multiinherit-在继承同一文件超过 一次
  • oelint.var.nativefilename-应命名仅限本机的配方 -本地的
  • oelint.var.order-变量顺序
  • oelint.var.override-检查include/append是否正在重写 变量
  • oelint.var.suggestedvar-有关建议变量的注意事项
  • oelint.vars.bugtrackerisur-bugtracker应该是一个url
  • oelint.vars.homepageprefix-主页应以https://或开头 http://
  • oelint.vars.multileident-在多行赋值中,行缩进 是可取的
  • oelint.vars.section lowercase-section应仅为小写 [f]
  • oelint.vars.spacesAssignment-“=”应该是正确的变量 作业
  • oelint.vars.summary80chars-摘要最多应为80个字符 长
  • oelint.vars.summary line breaks-摘要中没有换行符
  • oelint.vars.valuequoted-应正确引用变量值

欢迎加入QQ群-->: 979659372 Python中文网_新手群

推荐PyPI第三方库


热门话题
部署在kubernetes上时,微服务中服务间通信中的java连接超时问题   java Nway合并对2G字符串文件进行排序   java如何使用FlexJson按特定顺序序列化对象和属性   如何在java布尔方法中导入文本文件   swing需要帮助在我的Java GUI中实现用户输入的侦听器   java如何读取枚举中Spring Messagesource的内容?   每个Ajaxcall上(之前和之后)的java Javascript   java compareTo(Comparable)方法对于Comparable类型未定义   带换行符的java Bash输入重定向   使用Spring授权标记检查用户是否登录时发生java错误?   使用大尺寸(100000)数组执行快速排序时出现Java StackOverflower错误   java forEach迭代器标记   Java ClassNotFound异常,Maven依赖项作为JAR   java将HQL转换为SQL查询   java正在将片段列表发送到FragmentPagerAdapter   java onActivityResult应该调用super。onActivityResult   java如果我导入一个超类,我也需要导入它的子类吗?   java是否可以通过openid协议对aadhar进行身份验证