c++ - 如何防止cpplint报告错误的包括顺序?
问题描述
标头.hpp:
#pragma once
#include <path/to/file.h>
#include <algorithm>
#include <chrono>
#include <memory>
#include <optional>
#include <string>
#include <vector>
当我运行 cpplint.py 时,我得到Found C system header after C++ system header. Should be: helpers.h, c system, c++ system, other. [build/include_order] [4]
,指向<optional>
。
是否可以在不禁用的情况下防止cpplint.py
这样做build/include_order
?
注意:<optional>
是c++17,cpplint
afaik不支持。
你可以在这里下载我的 cpplint 版本:https ://raw.githubusercontent.com/google/styleguide/305ac87/cpplint/cpplint.py
提交到 GitHub Cpplint 的问题: https ://github.com/cpplint/cpplint/issues/138
解决方案
推荐阅读
- python - 在某些列条件下,在 python 中聚合行(总和)的最简单方法是什么?
- powershell - 如何使用powershell转换文件内容
- azure - 在 Azure 的 Ubuntu VM 中打开端口 443 不起作用
- php - 带有索引的内爆数组列表元素
- tfs - 使用 TFS 2018 将构建部署到现有网站
- c++ - 如何使用迭代器擦除 std::list 模板
- modeling - 我将如何构建与图对应的整数优化模型
- arrays - 如何使用laravel在数据库表的单行中以数组格式存储表表
- python - 加入两个数据帧后的 Pyspark 重复
- android - Kotlin notifyDataSetChanged 在 Fragment 中不起作用(带有 ListView 的 BaseAdapter)