Skip to content

Commit 017d64d

Browse files
[ci] Run analysis with older versions of Flutter (#1152)
1 parent 1cc7cea commit 017d64d

File tree

26 files changed

+138
-97
lines changed

26 files changed

+138
-97
lines changed

.ci/scripts/prepare_tool.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,4 @@ git fetch origin master
88

99
# Pinned version of the plugin tools, to avoid breakage in this repository
1010
# when pushing updates from flutter/plugins.
11-
dart pub global activate flutter_plugin_tools 0.7.3
11+
dart pub global activate flutter_plugin_tools 0.8.1

.cirrus.yml

Lines changed: 20 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -29,10 +29,10 @@ flutter_upgrade_template: &FLUTTER_UPGRADE_TEMPLATE
2929
- git fetch origin
3030
# Switch to the requested channel.
3131
- git checkout $TARGET_TREEISH
32-
# When using a branch rather than a hash, reset to the upstream branch
33-
# rather than using pull, since the base image can sometimes be in a state
34-
# where it has diverged from upstream (!).
35-
- if [[ "$TARGET_TREEISH" == "$CHANNEL" ]]; then
32+
# When using a branch rather than a hash or version tag, reset to the
33+
# upstream branch rather than using pull, since the base image can sometimes
34+
# be in a state where it has diverged from upstream (!).
35+
- if [[ "$TARGET_TREEISH" == "$CHANNEL" ]] && [[ "$CHANNEL" != *"."* ]]; then
3636
- git reset --hard @{u}
3737
- fi
3838
# Run doctor to allow auditing of what version of Flutter the run is using.
@@ -55,8 +55,23 @@ task:
5555
always:
5656
format_script: ./script/tool_runner.sh format --fail-on-change
5757
license_script: dart pub global run flutter_plugin_tools license-check
58-
analyze_script: ./script/tool_runner.sh analyze --custom-analysis=web_benchmarks/testing/test_app,flutter_lints/example,rfw/example,metrics_center
58+
analyze_script: ./script/tool_runner.sh analyze --custom-analysis=script/configs/custom_analysis.yaml
5959
pubspec_script: ./script/tool_runner.sh pubspec-check
60+
# Does a sanity check that packages at least pass analysis on the N-1 and N-2
61+
# versions of Flutter stable if the package claims to support that version.
62+
# This is to minimize accidentally making changes that break old versions
63+
# (which we don't commit to supporting, but don't want to actively break)
64+
# without updating the constraints.
65+
# Note: The versions below should be manually updated after a new stable
66+
# version comes out.
67+
- name: legacy-version-analyze
68+
depends_on: format+analyze
69+
env:
70+
matrix:
71+
CHANNEL: "2.5.3"
72+
CHANNEL: "2.8.1"
73+
analyze_script:
74+
- ./script/tool_runner.sh analyze --skip-if-not-supporting-flutter-version="$CHANNEL" --custom-analysis=script/configs/custom_analysis.yaml
6075
- name: publishable
6176
env:
6277
# TODO(stuartmorgan): Remove once the fix for https://github.com/dart-lang/pub/issues/3152

.clang-format

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
BasedOnStyle: Google
2+
---
3+
Language: Cpp
4+
DerivePointerAlignment: false
5+
PointerAlignment: Left
6+
---
7+
Language: ObjC
8+
DerivePointerAlignment: false
9+
PointerAlignment: Right

.github/workflows/release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ jobs:
3131
with:
3232
fetch-depth: 0 # Fetch all history so the tool can get all the tags to determine version.
3333
- name: Set up tools
34-
run: dart pub global activate flutter_plugin_tools 0.7.3
34+
run: dart pub global activate flutter_plugin_tools 0.8.1
3535

3636
# # This workflow should be the last to run. So wait for all the other tests to succeed.
3737
- name: Wait on all tests

packages/extension_google_sign_in_as_googleapis_auth/example/ios/Runner/main.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
#import <UIKit/UIKit.h>
77
#import "AppDelegate.h"
88

9-
int main(int argc, char* argv[]) {
9+
int main(int argc, char *argv[]) {
1010
@autoreleasepool {
1111
return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class]));
1212
}

packages/flutter_markdown/example/windows/runner/main.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
#include "utils.h"
1212

1313
int APIENTRY wWinMain(_In_ HINSTANCE instance, _In_opt_ HINSTANCE prev,
14-
_In_ wchar_t *command_line, _In_ int show_command) {
14+
_In_ wchar_t* command_line, _In_ int show_command) {
1515
// Attach to console when present (e.g., 'flutter run') or create a
1616
// new console when running with a debugger.
1717
if (!::AttachConsole(ATTACH_PARENT_PROCESS) && ::IsDebuggerPresent()) {

packages/imitation_game/imitation_tests/smiley/uikit/smiley/smiley/SceneDelegate.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,6 @@
66

77
@interface SceneDelegate : UIResponder <UIWindowSceneDelegate>
88

9-
@property(strong, nonatomic) UIWindow* window;
9+
@property(strong, nonatomic) UIWindow *window;
1010

1111
@end

packages/imitation_game/imitation_tests/smiley/uikit/smiley/smiley/ViewController.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,6 @@
55
#import <UIKit/UIKit.h>
66

77
@interface ViewController : UIViewController
8-
@property(nonatomic, strong) IBOutlet UIImageView* imageView;
8+
@property(nonatomic, strong) IBOutlet UIImageView *imageView;
99

1010
@end

packages/imitation_game/imitation_tests/smiley/uikit/smiley/smiley/main.m

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@
55
#import <UIKit/UIKit.h>
66
#import "AppDelegate.h"
77

8-
int main(int argc, char* argv[]) {
9-
NSString* appDelegateClassName;
8+
int main(int argc, char *argv[]) {
9+
NSString *appDelegateClassName;
1010
@autoreleasepool {
1111
// Setup code that might create autoreleased objects goes here.
1212
appDelegateClassName = NSStringFromClass([AppDelegate class]);

packages/palette_generator/example/ios/Runner/main.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
#import <UIKit/UIKit.h>
77
#import "AppDelegate.h"
88

9-
int main(int argc, char* argv[]) {
9+
int main(int argc, char *argv[]) {
1010
@autoreleasepool {
1111
return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class]));
1212
}

0 commit comments

Comments
 (0)