Since I am a general contractor I do a wide variety of jobs from major home remodels to one-on projects. In some cases it am surprises that a prior job completed by another contractor had clear code violations. Sometimes those violations are significant, and have the potential of contributing to a major structural problems. At other times times a code violation is more minor but could still cause a problem, like mode. There is a reason that we have building codes.
Recently I did a roofing job and again came across a clear code violation. Below is a demonstration of this issue and how I fixed it. See the photos.