Skip to content

Commit

Permalink
Disable "sort-includes" in clang-format for ZAP generation.
Browse files Browse the repository at this point in the history
Also update cluster-objects-src.zapt to use the correct #include statement order which was previously altered by clang-format. Update the ZAP-generated files.
  • Loading branch information
selissia committed Feb 12, 2024
1 parent 3b3d37b commit 9cadf45
Show file tree
Hide file tree
Showing 23 changed files with 52 additions and 52 deletions.
2 changes: 1 addition & 1 deletion scripts/tools/zap/generate.py
Original file line number Diff line number Diff line change
Expand Up @@ -314,7 +314,7 @@ def runClangPrettifier(templates_file, output_dir):
# compatible only with pigweed provided clang-format (which is
# tracking non-released clang).
clang_format = getClangFormatBinary()
args = [clang_format, '-i']
args = [clang_format, '--sort-includes=false', '-i']
args.extend(clangOutputs)
subprocess.check_call(args)
print('Formatted using %s (%s)' % (clang_format, subprocess.check_output([clang_format, '--version'])))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,16 +17,16 @@

// THIS FILE IS GENERATED BY ZAP

#include <cinttypes>
#include <cstdint>
#include <cinttypes>

#include <app-common/zap-generated/callback.h>
#include <app-common/zap-generated/cluster-objects.h>
#include <app-common/zap-generated/ids/Clusters.h>
#include <app-common/zap-generated/ids/Commands.h>
#include <app/util/util.h>
#include <app/CommandHandler.h>
#include <app/InteractionModelEngine.h>
#include <app/util/util.h>
#include <lib/core/CHIPSafeCasts.h>
#include <lib/support/TypeTraits.h>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@
// Prevent multiple inclusion
#pragma once

#include <app/util/endpoint-config-defines.h>
#include <lib/core/CHIPConfig.h>
#include <app/util/endpoint-config-defines.h>

// Default values for the attributes longer than a pointer,
// in a form of a binary blob
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,16 +17,16 @@

// THIS FILE IS GENERATED BY ZAP

#include <cinttypes>
#include <cstdint>
#include <cinttypes>

#include <app-common/zap-generated/callback.h>
#include <app-common/zap-generated/cluster-objects.h>
#include <app-common/zap-generated/ids/Clusters.h>
#include <app-common/zap-generated/ids/Commands.h>
#include <app/util/util.h>
#include <app/CommandHandler.h>
#include <app/InteractionModelEngine.h>
#include <app/util/util.h>
#include <lib/core/CHIPSafeCasts.h>
#include <lib/support/TypeTraits.h>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@
// Prevent multiple inclusion
#pragma once

#include <app/util/endpoint-config-defines.h>
#include <lib/core/CHIPConfig.h>
#include <app/util/endpoint-config-defines.h>

// Default values for the attributes longer than a pointer,
// in a form of a binary blob
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{{> header}}

#include <app/data-model/WrappedStructEncoder.h>
#include <app-common/zap-generated/cluster-objects.h>
#include <app/data-model/WrappedStructEncoder.h>

#include <variant>

Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.h

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 4 additions & 4 deletions src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.mm

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion src/darwin/Framework/CHIP/zap-generated/MTRClusters.h

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions src/darwin/Framework/CHIP/zap-generated/MTRClusters.mm

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions zzz_generated/chip-tool/zap-generated/cluster/Commands.h

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 9cadf45

Please sign in to comment.