Skip to content

Conversation

@buenaflor
Copy link
Contributor

#skip-changelog

…structure

- Updated guidelines to ensure test group and test names read as coherent sentences.
- Introduced a structured approach for naming by depth, emphasizing the use of subjects, contexts, variants, and behaviors.
- Added examples and anti-patterns to illustrate best practices in test organization and naming.
- Added comprehensive guidelines for identifiers, ordering, formatting, comments, and documentation to improve code consistency and readability.
- Included best practices for naming conventions, code structure, and documentation styles to align with the Effective Dart guide.
- Emphasized the importance of adhering to these guidelines for new and modified tests.
- Streamlined project structure section by removing table format for a more concise list format.
- Updated environment section to include specific Flutter and Dart versions.
- Enhanced testing guidelines with clearer commands and descriptions for Dart and Flutter packages.
- Added new guidelines for modern Dart language features to promote clarity and reduce boilerplate in code.
@buenaflor buenaflor requested a review from denrase as a code owner December 29, 2025 14:00
AGENTS.md Outdated

### Test File Organization

When a test file grows large, consider splitting it into sub-files by context:
Copy link
Collaborator

Choose a reason for hiding this comment

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

Probably more of a code-smell if single classes have so many responsibilities what we need to split up test files just to keep it understandable, no?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

usually yea, but we do have examples of those like Hub, Client where the test file itself is 1k LoC

we can probably remove this, makes more sense to judge individually

@buenaflor buenaflor marked this pull request as draft January 5, 2026 10:37
@buenaflor
Copy link
Contributor Author

putting this into draft, I saw some blog posts about writing better AGENTS.md files, gonna rework this a bit

- Updated AGENTS.md to clarify the structure and purpose of the Sentry Dart/Flutter SDK.
- Introduced new documentation files for code guidelines and test conventions, emphasizing best practices for Dart/Flutter development.
- Added detailed sections on naming conventions, test structure, and the use of modern Dart features to improve code clarity and maintainability.
- Ensured that all new and modified code adheres to these updated guidelines for consistency across the project.
@buenaflor buenaflor marked this pull request as ready for review January 5, 2026 15:28
@buenaflor
Copy link
Contributor Author

@denrase updated it

- Renamed section from "Doc Comments" to "Documentation Comments" for clarity.
- Added recommendations for when to write comments, emphasizing the importance of self-documenting code.
- Included specific guidelines on documenting public APIs and non-obvious reasoning, while advising against commenting on obvious behavior and providing excessive inline commentary.
@buenaflor buenaflor merged commit c41dfe2 into main Jan 7, 2026
9 checks passed
@buenaflor buenaflor deleted the chore/agents-md branch January 7, 2026 12:04
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.

3 participants