[lint] Enforce kCamelCase for global constants (flutter/engine#36175)

This commit is contained in:
Chris Bracken
2022-09-15 13:19:04 -07:00
committed by GitHub
parent 9a31ce9956
commit e089b766fe
3 changed files with 6 additions and 4 deletions

View File

@@ -31,6 +31,8 @@ CheckOptions:
value: 'CamelCase'
- key: readability-identifier-naming.EnumConstantPrefix
value: 'k'
- key: readability-identifier-naming.GlobalConstantCase
value: 'CamelCase'
- key: readability-identifier-naming.GlobalConstantPrefix
value: 'k'
- key: readability-identifier-naming.PrivateMemberCase

View File

@@ -20,12 +20,12 @@ namespace flutter {
// Since _FragmentShader is a private class, we can't use
// IMPLEMENT_WRAPPERTYPEINFO
static const tonic::DartWrapperInfo kDartWrapperInfo_ui_FragmentShader = {
static const tonic::DartWrapperInfo kDartWrapperInfoUIFragmentShader = {
"ui",
"_FragmentShader",
};
const tonic::DartWrapperInfo& FragmentShader::dart_wrapper_info_ =
kDartWrapperInfo_ui_FragmentShader;
kDartWrapperInfoUIFragmentShader;
std::shared_ptr<DlColorSource> FragmentShader::shader(
DlImageSampling sampling) {

View File

@@ -18,12 +18,12 @@ namespace flutter {
typedef CanvasImage Image;
// Since _Image is a private class, we can't use IMPLEMENT_WRAPPERTYPEINFO
static const tonic::DartWrapperInfo kDartWrapperInfo_ui_Image = {
static const tonic::DartWrapperInfo kDartWrapperInfoUIImage = {
"ui",
"_Image",
};
const tonic::DartWrapperInfo& Image::dart_wrapper_info_ =
kDartWrapperInfo_ui_Image;
kDartWrapperInfoUIImage;
CanvasImage::CanvasImage() = default;