1
0
mirror of https://github.com/StackExchange/dnscontrol.git synced 2024-05-11 05:55:12 +00:00

Add .gitattributes file and fix line endings to match. (#1004)

* NEW: .gitattributes
* Fix line endings
* Fix File Endings
This commit is contained in:
Tom Limoncelli
2020-12-25 10:18:01 -05:00
committed by GitHub
parent e9f4257ad2
commit 18d99fd30f
12 changed files with 112 additions and 82 deletions

30
.gitattributes vendored Normal file
View File

@ -0,0 +1,30 @@
* text=auto
# Git itself
.gitattributes eol=lf
.gitigore eol=lf
# dnscontrol files are unix line-endings:
*.md text eol=lf
*.js text eol=lf
*.json text eol=lf
*.yaml text eol=lf
*.zone text eol=lf
*.tsv text eol=lf
# shell scripts are unix line-endings:
*.sh text eol=lf
# powershell scripts are DOS line-endings:
*.ps1 text eol=crlf
*.nuspec text eol=crlf
# Go code are unix line-endings:
*.go text eol=lf
go.mod text eol=lf
go.sum text eol=lf
# Graphics are binary:
*.jpg binary
*.png
*.svg

View File

@ -1,19 +1,19 @@
--- ---
name: IP name: IP
parameters: parameters:
- ip - ip
--- ---
Converts an IPv4 address from string to an integer. This allows performing mathematical operations with the IP address. Converts an IPv4 address from string to an integer. This allows performing mathematical operations with the IP address.
This does not accept IPv6 addresses. (PRs gladly accepted.) This does not accept IPv6 addresses. (PRs gladly accepted.)
{% include startExample.html %} {% include startExample.html %}
{% highlight js %} {% highlight js %}
var addrA = IP('1.2.3.4') var addrA = IP('1.2.3.4')
var addrB = addrA + 1 var addrB = addrA + 1
// addrB = 1.2.3.5 // addrB = 1.2.3.5
{%endhighlight%} {%endhighlight%}
{% include endExample.html %} {% include endExample.html %}

View File

@ -1,3 +1,3 @@
D("foo.com","none", D("foo.com","none",
MX("@",15,"foo.com.") MX("@",15,"foo.com.")
); );

View File

@ -1,13 +1,13 @@
D("foo.com","none", D("foo.com","none",
// Allow letsencrypt to issue certificate for this domain // Allow letsencrypt to issue certificate for this domain
CAA("@","issue","letsencrypt.org"), CAA("@","issue","letsencrypt.org"),
// Allow no CA to issue wildcard certificate for this domain // Allow no CA to issue wildcard certificate for this domain
CAA("@","issuewild",";"), CAA("@","issuewild",";"),
// Report all violation to test@example.com. If CA does not support // Report all violation to test@example.com. If CA does not support
// this record then refuse to issue any certificate // this record then refuse to issue any certificate
CAA("@", "iodef", "mailto:test@example.com", CAA_CRITICAL), CAA("@", "iodef", "mailto:test@example.com", CAA_CRITICAL),
// Optionally report violation to http://example.com // Optionally report violation to http://example.com
CAA("@", "iodef", "http://example.com"), CAA("@", "iodef", "http://example.com"),
// Report violation to https://example.com // Report violation to https://example.com
CAA("@", "iodef", "https://example.com", CAA_CRITICAL) CAA("@", "iodef", "https://example.com", CAA_CRITICAL)
); );

View File

@ -1,3 +1,3 @@
D("foo.com","none" D("foo.com","none"
, TXT("dkimtest2",DKIM("this string is 255 bytes long.hkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAnKZogtjOlHoeY8iZ5o5brlPOsj/a2Q9Bopu1kHxlxrdw7tZVL9FzUMngiIYGrl8dbP7Rvk7TLMoxHxVkRZPBtIpsKIab/gOUoPLQVYbrAmzyguHYBwAApi3H/pvjUsK8+XF0dKY17AR96lokAPqvfBaUb+DSx8zNw2hrYWYVqvCtnxHUGEUhT1bTlEZBptH3jthis is the remainder. it is 156 bytes long.mOhl2JmbsFKy+RoMTwbkk0/meRvcEFWLHkr4MSgbnie6OpQvM4Y51+kO6DUVr3rwjrdVO9wpFt+n/hdQ92TNif17RMJtE5AGaQ6BN3yJQIDAQAB;")) , TXT("dkimtest2",DKIM("this string is 255 bytes long.hkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAnKZogtjOlHoeY8iZ5o5brlPOsj/a2Q9Bopu1kHxlxrdw7tZVL9FzUMngiIYGrl8dbP7Rvk7TLMoxHxVkRZPBtIpsKIab/gOUoPLQVYbrAmzyguHYBwAApi3H/pvjUsK8+XF0dKY17AR96lokAPqvfBaUb+DSx8zNw2hrYWYVqvCtnxHUGEUhT1bTlEZBptH3jthis is the remainder. it is 156 bytes long.mOhl2JmbsFKy+RoMTwbkk0/meRvcEFWLHkr4MSgbnie6OpQvM4Y51+kO6DUVr3rwjrdVO9wpFt+n/hdQ92TNif17RMJtE5AGaQ6BN3yJQIDAQAB;"))
); );

View File

@ -1,10 +1,10 @@
D("foo.com","none", D("foo.com","none",
SSHFP("@",1,1,"66c7d5540b7d75a1fb4c84febfa178ad99bdd67c"), SSHFP("@",1,1,"66c7d5540b7d75a1fb4c84febfa178ad99bdd67c"),
SSHFP("@",1,2,"745a635bc46a397a5c4f21d437483005bcc40d7511ff15fbfafe913a081559bc"), SSHFP("@",1,2,"745a635bc46a397a5c4f21d437483005bcc40d7511ff15fbfafe913a081559bc"),
SSHFP("@",2,1,"66c7d5540b7d75a1fb4c84febfa178ad99bdd67c"), SSHFP("@",2,1,"66c7d5540b7d75a1fb4c84febfa178ad99bdd67c"),
SSHFP("@",2,2,"745a635bc46a397a5c4f21d437483005bcc40d7511ff15fbfafe913a081559bc"), SSHFP("@",2,2,"745a635bc46a397a5c4f21d437483005bcc40d7511ff15fbfafe913a081559bc"),
SSHFP("@",3,1,"66c7d5540b7d75a1fb4c84febfa178ad99bdd67c"), SSHFP("@",3,1,"66c7d5540b7d75a1fb4c84febfa178ad99bdd67c"),
SSHFP("@",3,2,"745a635bc46a397a5c4f21d437483005bcc40d7511ff15fbfafe913a081559bc"), SSHFP("@",3,2,"745a635bc46a397a5c4f21d437483005bcc40d7511ff15fbfafe913a081559bc"),
SSHFP("@",4,1,"66c7d5540b7d75a1fb4c84febfa178ad99bdd67c"), SSHFP("@",4,1,"66c7d5540b7d75a1fb4c84febfa178ad99bdd67c"),
SSHFP("@",4,2,"745a635bc46a397a5c4f21d437483005bcc40d7511ff15fbfafe913a081559bc") SSHFP("@",4,2,"745a635bc46a397a5c4f21d437483005bcc40d7511ff15fbfafe913a081559bc")
); );

View File

@ -1,4 +1,4 @@
D("foo.com","none", D("foo.com","none",
NAPTR("@",100,10,"U","E2U+sip","!^.*$!sip:customer-service@example.com!","example"), NAPTR("@",100,10,"U","E2U+sip","!^.*$!sip:customer-service@example.com!","example"),
NAPTR("@",102,10,"U","E2U+email","!^.*$!mailto:information@example.com!","example") NAPTR("@",102,10,"U","E2U+email","!^.*$!mailto:information@example.com!","example")
); );

View File

@ -1,3 +1,3 @@
function a() { function a() {
return CNAME("A", "foo.com.") return CNAME("A", "foo.com.")
} }

View File

@ -1,8 +1,8 @@
require('../a.js'); require('../a.js');
function c() { function c() {
return [ return [
a(), a(),
CNAME("C", "foo.com.") CNAME("C", "foo.com.")
] ]
} }

View File

@ -1,8 +1,8 @@
require('pkg/js/parse_tests/complexImports/b/d/d.js'); require('pkg/js/parse_tests/complexImports/b/d/d.js');
function b() { function b() {
return [ return [
d(), d(),
CNAME("B", "foo.com.") CNAME("B", "foo.com.")
]; ];
} }

View File

@ -1,3 +1,3 @@
function d() { function d() {
return CNAME("D", "foo.com.") return CNAME("D", "foo.com.")
} }

View File

@ -1,8 +1,8 @@
require('./a/c/c.js'); require('./a/c/c.js');
require('./b/b.js'); require('./b/b.js');
D("foo.com","none", D("foo.com","none",
A("@","1.2.3.4"), A("@","1.2.3.4"),
c(), c(),
b() b()
); );