question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Do version numbers have to have a '.'?

See original GitHub issue

Looking at this line it looks to be testing for the presence of a dot in the version number https://github.com/pre-commit/pre-commit/blob/d827e9aa7211456965bf7d16f06ac6a85b0f2984/pre_commit/clientlib.py#L124 but what if a repo is just following a simple v1/v2 model?

I’m using this repo https://gitlab.salort.eu/jsalort/latexhook/-/tags which has a v1 tag. My .pre-commit-config.yaml looks like this:

repos:
    - repo: https://gitlab.salort.eu/jsalort/latexhook
      rev: v1
      hooks:
          - id: latexindent

This means every time i commit I get this error at the top image

My version is pre-commit==2.10.1 and I don’t think this used to happen

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:7 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
asottilecommented, Apr 4, 2021

yeah so for now I’m going to answer this issue as “yes” – we may revisit if this comes up more frequently

1reaction
paulhfischercommented, Feb 9, 2021

thanks for the issue, you’re correct this warning is new in pre-commit 2.10 (#1715) but shouldn’t be triggered in your case (it’s there to warn when you are pointing to master or HEAD in .pre-commit-config.yaml).

for now (until the detection is improved/updated) you could use the (short) sha the tag points to, in your case 7879fc02.

Read more comments on GitHub >

github_iconTop Results From Across the Web

How do version numbers work?
Version numbers usually consist of three numbers separated by dots. For example: 1.2.3 These numbers have names. The leftmost number (1) is ...
Read more >
What do the numbers in a version typically represent (i.e. ...
The first number is typically referred to as the major version number. It's basically used to denote significant changes between builds ...
Read more >
What Is a Version Number and Why Is It Used?
A version number is a unique set of numbers given to each specific release of a software program, file, hardware model, firmware, or...
Read more >
Software versioning
Software versioning is the process of assigning either unique version names or unique version numbers to unique states of computer software.
Read more >
web applications - Are version numbers needed
Consumers of the service can also use version numbers. Not all consumers need to know version numbers, but it is something that can...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found