Yahoo Search Busca da Web

Resultado da Busca

  1. Sourcery is a tool that uses artificial intelligence to review your code on every pull request in GitHub. It gives you feedback, suggestions, and bug and security alerts to help you write better and faster code.

    • For teams

      Sourcery in your CI keeps all your code to the same...

    • For pros

      Let Sourcery handle the repetitive stuff you need to deal...

    • Pricing

      Sourcery has plans for individuals, teams, and enterprises....

    • Log in

      Sign in to your Sourcery account. Pricing Blog Docs Log In...

    • Get started

      Sign in to your Sourcery account. Pricing Blog Docs Log In...

    • Docs

      Sourcery is a pair programmer to help you improve and review...

    • About Us

      Sourcery instantly refactors your Python code. Try Sourcery...

    • Changelog

      Sourcery will now skip reviewing pull requests with too many...

  2. Sourcery is a team of developers who aim to make technical debt and poor quality code a thing of the past. They offer a tool that refactors your Python code and helps you spend more time on new features.

    • Overview
    • TL;DR
    • How To Get Started
    • Installation
    • Documentation
    • Usage
    • Issues
    • Contributing
    • Sponsoring

    In-Depth Sourcery guide is covered as part of my SwiftyStack engineering course.

    Sourcery Pro provides a powerful Stencil editor and extends Xcode with the ability to handle live AST templates: available on Mac App Store

    Overview.mp4

    Learn more about Sourcery Pro

    Sourcery is a code generator for Swift language, built on top of Apple's own SwiftSyntax. It extends the language abstractions to allow you to generate boilerplate code automatically.

    It's used in over 40,000 projects on both iOS and macOS and it powers some of the most popular and critically-acclaimed apps you have used (including Airbnb, Bumble, New York Times). Its massive community adoption was one of the factors that pushed Apple to implement derived Equality and automatic Codable conformance. Sourcery is maintained by a growing community of contributors.

    Sourcery allows you to get rid of repetitive code and create better architecture and developer workflows. An example might be implementing Mocks for all your protocols, without Sourcery you will need to write hundreds lines of code per each protocol like this:

    and with Sourcery ?

    Sourcery removes the need to write any of the mocks code, how many protocols do you have in your project? Imagine how much time you'll save, using Sourcery will also make every single mock consistent and if you refactor or add properties, the mock code will be automatically updated for you, eliminating possible human errors.

    Sourcery can be applied to arbitrary problems across your codebase, if you can describe an algorithm to another human, you can automate it using Sourcery.

    Most common uses are:

    •Equality & Hashing

    There are plenty of tutorials for different uses of Sourcery, and you can always ask for help in our Swift Forum Category.

    •The Magic of Sourcery is a great starting tutorial

    •Generating Swift Code for iOS deals with JSON handling code

    •How To Automate Swift Boilerplate with Sourcery generates conversions to dictionaries

    •Codable Enums implements Codable support for Enumerations

    Sourcery Workshops

    •Binary form

    Download the latest release with the prebuilt binary from release tab. Unzip the archive into the desired destination and run bin/sourcery

    •Homebrew

    brew install sourcery

    •CocoaPods

    Add pod 'Sourcery' to your Podfile and run pod update Sourcery. This will download the latest release binary and will put it in your project's CocoaPods path so you will run it with $PODS_ROOT/Sourcery/bin/sourcery

    Full documentation for the latest release is available here.

    Running the executable

    Sourcery is a command line tool; you can either run it manually or in a custom build phase using the following command:

    Swift Package command

    Sourcery can now be used as a Swift package command plugin. In order to do this, the package must be added as a dependency to your Swift package or Xcode project (see Installation above). To provide a configuration for the plugin to use, place a .sourcery.yml file at the root of the target's directory (in the sources folder rather than the root of the package).

    Command line options

    •--sources - Path to a source swift files or directories. You can provide multiple paths using multiple --sources option. •--templates - Path to templates. File or Directory. You can provide multiple paths using multiple --templates options. •--force-parse - File extensions of Sourcery generated file you want to parse. You can provide multiple extension using multiple --force-parse options. (i.e. file.toparse.swift will be parsed even if generated by Sourcery if --force-parse toparse). Useful when trying to implement a multiple phases generation. --force-parse can also be used to process within a sourcery annotation. For example to process code within sourcery:inline:auto:Type.AutoCodable annotation you can use --force-parse AutoCodable •--output [default: current path] - Path to output. File or Directory. •--config [default: current path] - Path to config file. File or Directory. See Configuration file. •--args - Additional arguments to pass to templates. Each argument can have an explicit value or will have implicit true value. Arguments should be separated with , without spaces (i.e. --args arg1=value,arg2). Arguments are accessible in templates via argument.name •--watch [default: false] - Watch both code and template folders for changes and regenerate automatically. •--verbose [default: false] - Turn on verbose logging •--quiet [default: false] - Turn off any logging, only emit errors •--disableCache [default: false] - Turn off caching of parsed data •--prune [default: false] - Prune empty generated files •--version - Display the current version of Sourcery •--help - Display help information •--cacheBasePath - Base path to the cache directory. Can be overriden by the config file. •--buildPath - Path to directory used when building from .swifttemplate files. This defaults to system temp directory

    If you get an unverified developer warning when using binary zip distribution try: xattr -dr com.apple.quarantine Sourcery-1.1.1

    Contributions to Sourcery are welcomed and encouraged!

    It is easy to get involved. Please see the Contributing guide for more details.

    A list of contributors is available through GitHub.

    To clarify what is expected of our community, Sourcery has adopted the code of conduct defined by the Contributor Covenant. This document is used across many open source communities, and articulates my values well. For more, see the Code of Conduct.

    If you'd like to support Sourcery development you can do so through GitHub Sponsors or Open Collective, it's highly appreciated 🙇‍

    If you are a company and would like to sponsor the project directly and get it's logo here, you can contact me directlySponsors

  3. krzysztofzablocki.github.ioSourcerySourcery Reference

    Sourcery scans your source code, applies your personal templates and generates Swift code for you, allowing you to use meta-programming techniques to save time and decrease potential mistakes. Using it offers many benefits: Write less repetitive code and make it easy to adhere to DRY principle.

  4. In this tutorial, you'll learn: What Sourcery does, and how to use it as your pair programmer. How to install Sourcery in VSCode & JetBrains IDEs. How to use Sourcery interactively in VS Code & JetBrains IDEs. Non-VSCode/JetBrains users.

  5. 10 de fev. de 2023 · Sourcery is a static code analysis tool for Python. It uses advanced algorithms to detect and correct common issues in your code, such as typos, formatting errors, and incorrect variable names. Sourcery also offers automated refactoring tools that help you optimize your code for readability and performance.

  6. Sourcery is a pair programmer to help you improve and review your code. automate repetitive tasks, and answer any questions you have.