Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[feat] Implemented GH-Actions for static code analysis #188

Merged
merged 1 commit into from
Feb 26, 2024

Conversation

opxdelwin
Copy link
Contributor

PR Description:

This PR addresses the issue titled #186. Previously, GitHub Actions were not enabled for automating static Flutter Code Analysis in this project.

Feature Implemented:

To resolve this, a pipeline has been established to test relevant commits for code analysis issues. This ensures that code quality is maintained consistently throughout the development process.

Moving forward, any analysis issues identified will be fixed within the main Actions PR itself, ensuring that our codebase remains clean and maintainable.

Future

  • Implement flutter test as part of workflow.

Awaiting everyone's valuable feedback.

@animator animator linked an issue Feb 25, 2024 that may be closed by this pull request
@opxdelwin
Copy link
Contributor Author

@animator @ashitaprasad , awaiting initial feedback. This can be tested locally using https://github.com/nektos/act

Copy link
Member

@ashitaprasad ashitaprasad Feb 26, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Revert changes made to this file. It is not relevant to this PR.

Copy link
Member

@ashitaprasad ashitaprasad Feb 26, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Revert changes made to this file. It is not relevant to this PR.

Copy link
Member

@ashitaprasad ashitaprasad Feb 26, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Revert changes made to this file. It is not relevant to this PR.

Copy link
Member

@ashitaprasad ashitaprasad Feb 26, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Revert changes made to this file. It is not relevant to this PR.

Copy link
Member

@ashitaprasad ashitaprasad Feb 26, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Revert changes made to this file. It is not relevant to this PR.

Copy link
Member

@ashitaprasad ashitaprasad Feb 26, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Revert changes made to this file. It is not relevant to this PR.

Copy link
Member

@ashitaprasad ashitaprasad Feb 26, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Revert changes made to this file. It is not relevant to this PR.

pubspec.lock Outdated
Copy link
Member

@ashitaprasad ashitaprasad Feb 26, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Revert changes made to this file. It is not relevant to this PR.

Copy link
Member

@ashitaprasad ashitaprasad Feb 26, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Revert changes made to this file. It is not relevant to this PR.

Copy link
Member

@ashitaprasad ashitaprasad Feb 26, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Revert changes made to this file. It is not relevant to this PR.

@opxdelwin
Copy link
Contributor Author

opxdelwin commented Feb 26, 2024

I've reverted all fixes made to the file for workflows to succeed.

Workflow output
| Analyzing apidash...
| 
| warning • Invalid option specified for 'enable-experiment': Flag "records" is no longer required • analysis_options.yaml:7:7 • invalid_option
| warning • The parameter type of '==' operators should be non-nullable • lib/models/form_data_model.freezed.dart:141:17 • non_nullable_equals_parameter
| warning • The parameter type of '==' operators should be non-nullable • lib/models/name_value_model.freezed.dart:138:17 • non_nullable_equals_parameter
|    info • The variable name '_$$_NameValueModelFromJson' isn't a lowerCamelCase identifier • lib/models/name_value_model.g.dart:9:19 • non_constant_identifier_names
|    info • The variable name '_$$_NameValueModelToJson' isn't a lowerCamelCase identifier • lib/models/name_value_model.g.dart:15:22 • non_constant_identifier_names
| warning • The value of the local variable 'length' isn't used • lib/screens/home_page/editor_pane/details_card/request_pane/request_headers.dart:40:11 • unused_local_variable
| warning • The value of the local variable 'length' isn't used • lib/screens/home_page/editor_pane/details_card/request_pane/request_params.dart:41:11 • unused_local_variable
| warning • This method overrides a method annotated as '@mustCallSuper' in 'State', but doesn't invoke the overridden method • lib/widgets/headerfield.dart:43:8 • must_call_super
| warning • This method overrides a method annotated as '@mustCallSuper' in 'State', but doesn't invoke the overridden method • lib/widgets/json_previewer.dart:156:8 • must_call_super
| warning • Unused import: 'package:apidash/main.dart' • test/widget_test.dart:1:8 • unused_import
| warning • Unused import: 'package:apidash/app.dart' • test/widget_test.dart:2:8 • unused_import
| warning • Unused import: 'package:apidash/common/utils.dart' • test/widget_test.dart:3:8 • unused_import     
| warning • Unused import: 'package:flutter/material.dart' • test/widgets/markdown_test.dart:1:8 • unused_import
|
| 14 issues found. (ran in 26.2s)
[Code Analysis/Flutter-Analyze]   ❌  Failure - Main Code Analysis

@ashitaprasad
Copy link
Member

LGTM 🚀

@ashitaprasad ashitaprasad merged commit f23fc2a into foss42:main Feb 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[feat] GH-Actions for static code analysis
2 participants