Giter Club home page Giter Club logo

Comments (12)

ajaybhargavb avatar ajaybhargavb commented on August 25, 2024 1

I would just test this manually by running this rule on packages with and without the commit hash.

from buildtools.

Eilon avatar Eilon commented on August 25, 2024 1

Yeah run it on some packages built on a recent Coherence-Signed, and it should pass (include both regular and .Sources packages). Then run it on older Coherence-Signed packages and it should fail.

from buildtools.

ajaybhargavb avatar ajaybhargavb commented on August 25, 2024

Yes. For example take a look at AssemblyHasCompanyAttributeRule

from buildtools.

victorhurdugaci avatar victorhurdugaci commented on August 25, 2024

Just a note on this one: the source packages (packages that don't have binaries in them) don't have commit hashes. The rule needs to take that into account and verify that there's no source file in the package (*.generated.cs) that contains that attribute.

from buildtools.

Eilon avatar Eilon commented on August 25, 2024

Hmm could we have a convention in the rule that ignores *.Sources packages? I don't like the idea of using *.generated.cs as a flag because there could be other files that match that pattern.

from buildtools.

ryanbrandenburg avatar ryanbrandenburg commented on August 25, 2024

What's the best way to test this?

from buildtools.

Eilon avatar Eilon commented on August 25, 2024

I would ignore .Sources packages and check everything else.

from buildtools.

victorhurdugaci avatar victorhurdugaci commented on August 25, 2024

Unzip the nupkg and check that the assemblies inside have the attribute set and its value matches the format of a commit hash. It would be too hard to verify that the actual value is the right commit.

from buildtools.

victorhurdugaci avatar victorhurdugaci commented on August 25, 2024

Oh, you mean the sources packages or how to test the attribute? 😕

from buildtools.

ajaybhargavb avatar ajaybhargavb commented on August 25, 2024

Ignoring .Sources should be easy. We have access to the package id in the rule.

from buildtools.

Eilon avatar Eilon commented on August 25, 2024

Yeah of course we can't check that the hash is actually correct - we just want to verify existence.

from buildtools.

ryanbrandenburg avatar ryanbrandenburg commented on August 25, 2024

I was asking what the best way to set this up to test that my changes work is since there's no tests and I can't find where it's used anywhere.

from buildtools.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.