Skip to main content

Why more code is not always a bad thing

· 15 min read
Majid Hajian
Google Developer Expert

There's a prevailing myth in software development that less code is always better. While concise code can benefit specific contexts, it doesn't necessarily equate to better code. Code quality, maintainability, and readability are often far more important than simply being less.

This article will explore why writing more code can often lead to better software, especially in Dart and Flutter applications. We'll focus on clarity, modularity, flexibility, robustness, and error handling. We'll also discuss the drawbacks of "magic" code and the importance of linting and rules in maintaining code quality.

What’s new in DCM 1.19.0

· 10 min read

Cover

Today we’re excited to announce the release of DCM 1.19.0!

This release includes 9 new rules (4 for Riverpod), proper support for codegen packages by the check-dependencies command, new summary output to sdterr for various reporters, new visualization of the statically resolved widget trees for analyze-widgets, new fix type for removing unused files (moved from check-unused-files), documentation updates and other DX improvements! 🚀

Let's go through the highlights of this release! (And you can find the full list of changes in our changelog)

Ensuring Consistent and High-Quality Code In Dart and Flutter Projects Through Continuous Integration (CI)

· 9 min read
Majid Hajian
Google Developer Expert

Maintaining consistent and high-quality code is necessary in the fast-paced software development world, especially in Flutter and Dart projects, as they are known for being speedy tools. Continuous Integration (CI) has emerged as a crucial practice that helps development teams achieve this goal. CI provides rapid feedback by integrating code frequently and automating various aspects of the development process, allowing teams to identify and rectify issues early.

ChallengesChallenges

This article explores the significance of CI in enforcing code quality and consistency, the role of lint tools, especially DCM, and practical examples of integrating these tools with CI pipelines.

What’s new in DCM 1.18.0

· 9 min read

Cover

Today we’re excited to announce the release of DCM 1.18.0!

This release includes 8 new rules, improved "New Version" notifications, new grouping option for IntelliJ plugin, automatic DCM version detection by the "setup-dcm" action and general UX improvements 🚀.

warning

❗️ All DCM versions prior to 1.11.0 have been discontinued.

❗️ "check-unnecessary-nullable" command has been removed.

Let's go through the highlights of this release! (And you can find the full list of changes in our changelog)

Enhancing Flutter/Dart code quality with pre-commit hooks

· 8 min read
Olivier Revial
Lead mobile developer at Steeple

Enhancing Flutter/Dart code quality with pre-commit hooks

On any real-world Flutter project (but any project, really...), you want to run an analyzer and a linter at some point to ensure your quality matches the baseline your team agreed on. If you've been following me for some time, you might know that I love a promising CI/CD pipeline (heck, I even wrote a series on the topic 🙃). I always recommend running these checks in your CI pipeline.

What’s new in DCM 1.17.0

· 11 min read

Cover

Today we’re excited to announce the release of DCM 1.17.0!

This release includes 9 new rules (3 for Riverpod 🔥), early access to the DCM Teams license management portal, per-package monorepo mode, global configuration with DCM version constrains and more 🚀.

info

The recommended preset has been updated and now includes some rules from 1.14.0, 1.15.0 and 1.16.0, so you may get new warnings if you use the build-in recommended preset or once you update the dart-code-metrics-presets package dependency.

warning

❗️ With the next release we plan to discontinue all DCM versions prior to 1.11.0.

If you're still using one of those, consider upgrading to a newer version.

Let's go through the highlights of this release! (And you can find the full list of changes in our changelog)

What’s new in DCM 1.16.0

· 7 min read

Cover

Today we’re excited to announce the release of DCM 1.16.0!

This release includes 2 new commands (one for the advanced analysis of parameters and another one for the project structure analysis), 5 new rules, UX improvements and more. 🚀

Let's go through the highlights of this release! (And you can find the full list of changes in our changelog)

What’s new in DCM 1.15.0

· 10 min read

Cover

Today we’re excited to announce the release of DCM 1.15.0!

This release includes extension types support for all existing rules and features, 13 new rules (4 for extension types), 30 new quick fixes (some of them are available via dcm fix), Checkstyle format for all available commands, UX improvements and more. 🚀

Let's go through the highlights of this release!

What’s new in DCM 1.14.0

· 9 min read

Cover

Today we’re excited to announce the release of DCM 1.14.0!

This release includes a new command to find duplicate functions, methods and constructors, new built-in preset to avoid installing an additional package, 4 new rules, and more 🚀.

info

The recommended preset now has new rules from 1.13.0, so you may get new warnings once you update the dart-code-metrics-presets package dependency.

Now let's go through the highlights of this release 🚀.

What’s new in DCM 1.13.0

· 11 min read

Cover

Today we’re excited to announce the release of DCM 1.13.0!

This release includes similar widgets report, improved unused code IDE integration and a new mode, 8 new rules, unused files in IDE, performance improvements, and more 🚀.

Now let's go through the highlights of this release 🚀.