15 مستودعات
Practices for eliminating redundant logic and dead code through abstraction and consolidation.
Distinct from Coding: Existing candidates focus on automated dead code elimination (tree-shaking) rather than architectural abstraction to remove duplication.
Explore 15 awesome GitHub repositories matching software engineering & architecture · Code Duplication Reduction. Refine with filters or upvote what's useful.
This project is a PHP clean code guide and software architecture reference. It provides a set of standards, naming conventions, and design patterns intended to improve the long-term maintainability and readability of PHP codebases. The guide emphasizes a structured approach to refactoring and system design, focusing on the application of SOLID principles to reduce coupling and increase extensibility. It advocates for object-oriented design through the use of composition over inheritance, the use of final classes to prevent unexpected overrides, and the implementation of strict type declaratio
Provides strategies for removing redundant logic and dead code by creating abstractions that consolidate repetitive patterns.
This project is a comprehensive guide to architectural standards and coding patterns for developing maintainable applications within the Laravel framework. It focuses on clean code standards, applying the single responsibility and DRY principles to ensure codebase predictability and consistency. The guide emphasizes decoupling components by moving business logic into service layers and shifting input validation into dedicated request classes to keep controllers lean. It advocates for the use of a service container and dependency injection to reduce class coupling and improve testability. The
Applies practices to eliminate redundant logic using shared components like query scopes and templates.
This project is a collection of software engineering principles and architectural design patterns designed to minimize the mental effort required to understand and maintain source code. It serves as a guide for implementing clean code methodologies and architectural simplification to reduce the overall cognitive load on developers. The framework emphasizes aligning module boundaries and ubiquitous language with business stakeholders to prevent architectural ripple effects. It advocates for balancing service granularity to avoid the overhead of distributed monoliths and suggests favoring objec
Provides guidance on balancing the cost of abstraction against the risk of tight coupling.
This project is a set of software engineering standards and architectural patterns for writing maintainable and refactorable TypeScript code. It provides a comprehensive guide for implementing clean code principles, focusing on the application of SOLID design and structural patterns to build decoupled systems. The framework prioritizes composition over inheritance and utilizes dependency inversion to reduce system coupling. It establishes standards for strict static typing and the use of read-only modifiers to ensure type safety and eliminate runtime errors. The guidance covers a broad range
Provides practices for eliminating redundant logic and dead code through the use of architectural abstractions.
100 Go Mistakes is a reference book and code review companion that catalogues frequent Go programming anti-patterns and provides corrected implementations for each one. It covers a wide range of common pitfalls, from range loop variable capture and interface nil handling to error wrapping and map iteration randomization, helping developers recognize and avoid these issues in their own code. The project distinguishes itself by offering a structured, example-driven approach to learning idiomatic Go. It covers core design decisions such as when to use pointer versus value receivers, how to apply
Shows how generics eliminate repetitive code by separating data types from behavior.
jscpd is a code duplication detector that scans source code across 223 languages to find identical or near-identical copy-pasted blocks using a rolling hash algorithm. It is built with a Rust core for high performance, exposed through a Node.js API and CLI, and can be run as a standalone binary with no runtime dependencies. The tool detects duplicates in embedded languages within Vue, Svelte, Astro, and Markdown files by tokenizing each language block separately, and it supports extensionless scripts via shebang detection. The project distinguishes itself through its integration capabilities
Configures a maximum duplication percentage that causes the pre-commit hook to reject commits.
Pylint is a static code analyzer for Python that scans source code for errors, coding standard violations, code smells, and type-related issues without executing the program. It functions as a plugin-based linter framework, allowing users to extend its analysis capabilities with custom or third-party checks for project-specific rules and framework support. The tool also includes a duplicate code detector that identifies identical or near-identical code blocks across a project to help reduce redundancy. Beyond its core linting functionality, Pylint can generate UML class and package diagrams f
Identifies identical or near-identical code blocks across a project to help reduce redundancy.
Pylint هي أداة تحليل كود استاتيكي لـ Python تتحقق من الكود المصدري بحثاً عن الأخطاء، وانتهاكات معايير البرمجة، وروائح الكود دون تنفيذ البرنامج. تقوم بتحليل الكود إلى شجرة بناء جملة مجردة وتتجول في الشجرة لاكتشاف المشكلات، وتفرض قواعد أسلوب واتفاقيات تسمية قابلة للتكوين، وتحدد كتل الكود المكررة من خلال مقارنة تسلسلات المصدر المرمزة. تتضمن الأداة أيضاً محرك استنتاج يستنتج أنواع المتغيرات عن طريق محاكاة مسارات الكود، مما يتيح تحليلاً أعمق حتى في الكود غير المكتوب. ما يميز Pylint هو بنية المدقق القائمة على الإضافات، والتي تسمح للمستخدمين بتوسيع التحليل عن طريق تحميل وحدات Python خارجية تسجل مدققين مخصصين وقواعد استنتاج في وقت التشغيل. تدعم طبقات ملفات الإعدادات، ودمج الإعدادات من ملفات إعدادات متعددة ووسائط سطر الأوامر بحيث يمكن تجاوز الإعدادات الافتراضية على مستوى المشروع بواسطة خيارات محلية أو خاصة بالإضافات. يتتبع Pylint أيضاً جودة الكود بمرور الوقت من خلال مقارنة نتائج التحليل الحالية مقابل درجة أساسية مخزنة، والإبلاغ عن التحسن أو التراجع في التشغيلات المتتالية، ويمكنه توليد مخططات فئات وحزم UML من شجرة بناء الجملة المجردة بتنسيقات Graphviz أو PlantUML أو MermaidJS. تتكامل الأداة في خطوط أنابيب التكامل المستمر وخطافات ما قبل الالتزام لتشغيل الفحوصات عبر إصدارات مترجم Python متعددة تلقائياً. يمكن تثبيتها عبر pip أو conda أو مدير حزم النظام، وتوفر تدقيقاً إملائياً اختيارياً لمعرفات الكود من خلال مكتبة enchant. يوفر Pylint أيضاً تكاملاً للمحرر لبيئات مثل Emacs و TextMate، ويتضمن عارض شرح الرسائل الذي يطبع الوصف الكامل وسياق أي رمز تحذير أو خطأ محدد مباشرة من سطر الأوامر.
Scans Python source files for identical or near-identical code blocks and reports their locations and similarity percentage.
PMD هو محلل كود ثابت متعدد اللغات يُستخدم لتحديد عيوب البرمجة، والمتغيرات غير المستخدمة، والكود الميت دون تنفيذ البرنامج. يعمل ككاشف لرائحة الكود (code smell) ومنفذ لمعايير البرمجة، مما يضمن التزام الكود المصدري باتفاقيات تسمية محددة، ومتطلبات هيكلية، وأدلة نمط المشروع. يتميز المشروع بمحرك قواعد قائم على XPath يسمح للمستخدمين بتعريف أنماط تحليل مخصصة باستخدام استعلامات مقابل شجرة بناء الجملة المجردة. كما يتضمن كاشفاً للنسخ واللصق لتحديد كتل الكود المكررة عبر ملفات متعددة ومصمم قواعد مرئي لإنشاء واختبار أنماط الكشف المخصصة. يغطي سطح التحليل اكتشاف الأخطاء، وتحديد مشكلات الصيانة لتقليل الديون التقنية، والتحقق من تطبيقات الاختبار. كما يوفر قدرات لتحديد الأساليب المعقدة للغاية وقوائم المعلمات المفرطة.
Identifies identical or near-identical code blocks by comparing tokenised source sequences across multiple files.
This project is a comprehensive guide and set of engineering standards for writing readable, maintainable, and scalable JavaScript code. It provides a framework for software architecture, refactoring patterns, and clean coding practices designed to improve codebase health and longevity. The guide emphasizes the application of SOLID principles and architectural strategies such as dependency inversion and the separation of concerns. It focuses on transforming complex conditional logic through polymorphism and refactoring, while promoting a transition from imperative loops to declarative functio
Establishes practices for eliminating redundant logic through architectural abstraction and consolidation.
هذا المشروع عبارة عن دليل للكود النظيف بلغة Python ومورد لإعادة الهيكلة. يوفر مجموعة من مبادئ حرفة البرمجيات وأمثلة مصممة لتحسين قابلية القراءة والصيانة للكود المصدري لـ Python. يركز المورد على تحسين تسمية المتغيرات لإزالة التعيين الذهني وتقسيم الدوال إلى وحدات ذات غرض واحد. ويوفر إرشادات لتقليل تكرار الكود وتنظيم المنطق لضمان بقاء المكونات سهلة التوسيع والصيانة. يغطي المحتوى هندسة البرمجيات وجودة التصميم، بما في ذلك تنفيذ مبادئ SOLID وأنماط التصميم القياسية في الصناعة. كما يتناول إدارة الآثار الجانبية واستخدام سير عمل الاختبار الآلي داخل البيئات الافتراضية.
Provides techniques for eliminating redundant logic through the creation of shared abstractions.
هذا المشروع عبارة عن إضافة IntelliJ IDE توفر بيئة تطوير متكاملة لـ Rust. تعمل كمنسق لنظام البناء وواجهة لتصحيح الأخطاء، وتوفر تحليلاً شاملاً للغة، وتمييزاً للصيغة، ومساعدة ذكية في تحرير الكود. تتكامل الإضافة مع خادم لغة لتوفير استنتاج النوع في الوقت الفعلي والتنقل في الكود. تتضمن أداة تحليل ثابت مخصصة لاكتشاف تكرارات الكود، وتحليل تسريبات الذاكرة، وقياس تغطية الاختبار. تغطي مجموعة الأدوات إدارة سلسلة الأدوات وتكامل Cargo للتعامل مع التبعيات والبيانات الوصفية. كما توفر إمكانيات لتوصيف الأداء، وتصحيح أخطاء البرامج في وقت التشغيل، وأتمتة الاختبار، بالإضافة إلى دعم تطوير تطبيقات الويب بما في ذلك إدارة الحاويات واستكشاف مخطط قاعدة البيانات.
Scans the codebase to detect repetitive logic patterns and redundant code to reduce technical debt.
Dhall is a type-safe configuration language designed to create programmable configuration files that are guaranteed to terminate. It is a non-Turing-complete language that uses a strict type system to ensure correctness and prevent infinite loops during evaluation. The project functions as a deterministic configuration engine and marshalling tool, converting programmable expressions into static formats such as JSON, YAML, and Bash. It distinguishes itself through a focus on security and integrity, using semantic hashing to pin remote imports and enforcing origin policies to prevent data exfil
Define reusable values using let-expressions to avoid duplicating data across a configuration.
Reek هو محلل أكواد ثابت لمشاريع Ruby مصمم لتحديد عيوب التصميم ومشاكل الصيانة المعروفة باسم "روائح الكود" (code smells). يعمل كأداة لضمان الجودة تفحص الكود المصدري دون تنفيذه للعثور على نقاط الضعف الهيكلية والديون المعمارية. يحدد المحلل أنماطاً محددة مثل الفئات الكبيرة، والأساليب الطويلة، والتسميات غير الواضحة. كما يكتشف قضايا تصميم أكثر تعقيداً، بما في ذلك حسد الميزات (feature envy)، وتكتلات البيانات، وتعدد الأشكال المحاكى، واقتران التحكم. تتضمن الأداة قدرات لإنشاء خط أساس للمشاكل (issue baselining) لإدارة الكود القديم، وتصفية تعتمد على التكوين لاستبعاد أدلة محددة. تدعم فحوصات الجودة الآلية عبر خطوط أنابيب التكامل المستمر (CI) وتوفر تقارير تحليل بتنسيقات مثل JSON وYAML وXML وHTML.
Detects methods that use parameters to decide execution paths, signaling potential duplication or fragmented responsibilities.
SwiftTips is a curated collection of guides, libraries, and design patterns focused on Swift language mastery, application architecture, and API design. It provides a technical resource for implementing advanced coding techniques and architectural best practices. The project emphasizes creating type-safe and conversational interfaces through strategic protocol composition and generics. It offers specialized patterns for building modular UI systems and managing complex view hierarchies, alongside comprehensive strategies for unit testing and dependency injection. The resource covers a broad s
Centralizes common data shared across different enum cases by wrapping them in a struct.