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
parameters:
- ip
---
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.)
{% include startExample.html %}
{% highlight js %}
var addrA = IP('1.2.3.4')
var addrB = addrA + 1
// addrB = 1.2.3.5
{%endhighlight%}
{% include endExample.html %}
---
name: IP
parameters:
- ip
---
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.)
{% include startExample.html %}
{% highlight js %}
var addrA = IP('1.2.3.4')
var addrB = addrA + 1
// addrB = 1.2.3.5
{%endhighlight%}
{% include endExample.html %}

View File

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

View File

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

View File

@ -1,3 +1,3 @@
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;"))
);
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;"))
);

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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