Skip to content

Commit 73c4f40

Browse files
agampemeta-codesync[bot]
authored andcommitted
Enable base linters for flavors
Summary: It is nice to have the formatter when promo diffs run into conflicts and the resolution isn't correctly indented and such. Keep clang-tidy off for the moment, as that was decided before. NOTE: Unclear what linters exactly now run, the format is just pretty garbage-y and illegible. Fix the LICENSELINT config so it knows all Redex flavors are public. That is the one that I hit in a promo. Reviewed By: xuhdev Differential Revision: D92546103 fbshipit-source-id: 709710625f6c669f680fef7d49a700b2176d91f0
1 parent 6969cd4 commit 73c4f40

File tree

19 files changed

+33
-32
lines changed

19 files changed

+33
-32
lines changed

examples/ProguardExample/app/src/main/java/com/facebook/redex/examples/proguardexample/ui/theme/Theme.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ private val LightColorScheme =
2727
fun MyApplicationTheme(
2828
darkTheme: Boolean = isSystemInDarkTheme(),
2929
dynamicColor: Boolean = true,
30-
content: @Composable () -> Unit
30+
content: @Composable () -> Unit,
3131
) {
3232
val colorScheme =
3333
when {

examples/ProguardExample/app/src/main/java/com/facebook/redex/examples/proguardexample/ui/theme/Type.kt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,4 +21,6 @@ val Typography =
2121
fontWeight = FontWeight.Normal,
2222
fontSize = 16.sp,
2323
lineHeight = 24.sp,
24-
letterSpacing = 0.5.sp))
24+
letterSpacing = 0.5.sp,
25+
)
26+
)

examples/Synth/app/src/main/java/com/facebook/redex/examples/synth/ui/theme/Theme.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ private val LightColorScheme =
2727
fun MyApplicationTheme(
2828
darkTheme: Boolean = isSystemInDarkTheme(),
2929
dynamicColor: Boolean = true,
30-
content: @Composable () -> Unit
30+
content: @Composable () -> Unit,
3131
) {
3232
val colorScheme =
3333
when {

examples/Synth/app/src/main/java/com/facebook/redex/examples/synth/ui/theme/Type.kt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,4 +21,6 @@ val Typography =
2121
fontWeight = FontWeight.Normal,
2222
fontSize = 16.sp,
2323
lineHeight = 24.sp,
24-
letterSpacing = 0.5.sp))
24+
letterSpacing = 0.5.sp,
25+
)
26+
)

libredex/Creators.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -677,7 +677,7 @@ MethodCreator::MethodCreator(DexMethodRef* ref,
677677
ref->get_proto(),
678678
access,
679679
std::move(anno),
680-
with_debug_item){};
680+
with_debug_item) {};
681681

682682
MethodCreator::MethodCreator(DexType* cls,
683683
const DexString* name,

libredex/MethodProfiles.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -433,8 +433,8 @@ void parse_manual_file(
433433
boost::split_regex(method_and_class, method_and_class_string,
434434
boost::regex("->"));
435435
always_assert(method_and_class.size() == 1 || method_and_class.size() == 2);
436-
manual_profile_lines.push_back({current_line, flags, method_and_class,
437-
config_names, manual_filename});
436+
manual_profile_lines.push_back(
437+
{current_line, flags, method_and_class, config_names, manual_filename});
438438
}
439439

440440
std::mutex unresolved_mutex;

libredex/RedexMappedFile.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,9 @@ RedexMappedFile& RedexMappedFile::operator=(RedexMappedFile&& rhs) noexcept {
3737

3838
RedexMappedFile RedexMappedFile::open(std::string path, bool read_only) {
3939
auto map = std::make_unique<boost::iostreams::mapped_file>();
40-
std::ios_base::openmode mode = (std::ios_base::openmode)(
41-
std::ios_base::in | (read_only ? 0 : std::ios_base::out));
40+
std::ios_base::openmode mode =
41+
(std::ios_base::openmode)(std::ios_base::in |
42+
(read_only ? 0 : std::ios_base::out));
4243
map->open(path, mode);
4344
if (!map->is_open()) {
4445
throw std::runtime_error(std::string("Could not map ") + path);

opt/outliner/OutlinerTypeAnalysis.cpp

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -822,9 +822,10 @@ const DexType* OutlinerTypeAnalysis::get_const_insns_type_demand(
822822
// 1. Let's see if we can get something out of the constant-uses analysis.
823823
constant_uses::TypeDemand type_demand{constant_uses::TypeDemand::None};
824824
for (const auto* insn : UnorderedIterable(const_insns)) {
825-
type_demand = (constant_uses::TypeDemand)(
826-
type_demand & m_constant_uses->get_constant_type_demand(
827-
const_cast<IRInstruction*>(insn)));
825+
type_demand =
826+
(constant_uses::TypeDemand)(type_demand &
827+
m_constant_uses->get_constant_type_demand(
828+
const_cast<IRInstruction*>(insn)));
828829
if (type_demand == constant_uses::TypeDemand::Error) {
829830
return nullptr;
830831
}

opt/reduce-array-literals/ReduceArrayLiterals.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,8 @@
2222
#include "DeterministicContainers.h"
2323
#include "IRCode.h"
2424
#include "IRInstruction.h"
25-
#include "LiveRange.h"
2625
#include "InterDexPass.h"
26+
#include "LiveRange.h"
2727
#include "PassManager.h"
2828
#include "Resolver.h"
2929
#include "Show.h"

opt/remove-unreachable/RemoveUnreachable.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -320,7 +320,8 @@ void RemoveUnreachablePassBase::run_pass(DexStoresVector& stores,
320320
auto uninstantiables_stats = reachability::sweep_uncallable_virtual_methods(
321321
stores, reachable_aspects);
322322
uninstantiables_stats.report(pm);
323-
{}
323+
{
324+
}
324325
}
325326
if (should_sweep_annotation_elements()) {
326327
pm.incr_metric(

0 commit comments

Comments
 (0)